returnVal = myData2.splice(index,1);
here the index is the selected row's index in the grid
If you want to delete multiple rows from a grid, you can do this by,
passing the array of indices of the rows.
For example if you want to delete rows having indices 1,3,5,7
all u need to do is , put them in an array and pass it as a parameter.
say tmpary = ["1","3","5","7"], and its length is 4.
so doing as follows will delete first row, third row, fifth row and seventh.