Hi,
I am using Infragistics version 10.2 and have a UltraWebGrid on my page. I am handling the BeforeRowDeactivate event in Javascript to update grid cells with some data from other controls on the page. On a certain condition inside this event I would like to cancel the row selection event and keep the current selected row. Is this possible from within Javascript? Any samples would help.
Thanks!
Hi pdharmesh,
It has been a while since your post, however in case you still need assistance I would be glad to help.
I am attaching a sample for you which demonstrates how the row selection changed event can be cancelled upon a certain condition. The sample uses the Northwind DB and if the index of the currently selected row is even, the selection of a new row is cancelled.
Below is the javascript code used:
function UltraWebGrid1_BeforeRowDeactivateHandler(gridName, rowId){ //if the index of current row is even - cancel selection, else proceed if (igtbl_getRowById(rowId).getIndex() % 2 == 0) { return true; } else { return false; }}
Hope this helps. Please contact me if you have any questions.