Hi,
I am working with an ms listbox control and a webgrid, transferring items between the two wholly on the client side. I have run into problems when I move a second row from my webgrid after clicking a button that calls javascript to 'remove this item from the grid and put it in the list box'. This works fine when i select the first grid row , but then an error occurs when I select the next row (previously the second displayed grid row but now appears as the first row). Using the code below I get an error because it is still trying to reference the original row 0 ie grid_r_0 as it remains in the SelectedRows collection.
Questions I have and would appreciate any feedback on are:
Incidentally the reason why I am doing this is because I want to have the ability to move rows up and down in the webgrid, so the user can specify the exact sequence of items in the grid. I have extended the KB article KB05596 "HOWTO:move a row to top or bottom of grid" to do this.
thanks very much for feedback
David
David,
I know you posted this a long time ago but do you remember how you got around this problem. I am having the issue where I sort (either client-side or server-side), then delete a selected row and then my client-side SelectedRows collection still contains the previously deleted selected rows. This messes up the next delete process and the user ends up deleting rows they did not select. Thanks for your help.