Hi All,
I have two gripds on a web page. When I select the row in the 1st grid then the second grid data has to accordingly. So I need to get the row number the user has selected. So please let me know which event is fired when clicked on the first.
The same can be done in Windows web grid.
Thanks
On the client side, you can setup the javascript event CellClickHandler (displaylayout, clientsideevents), then get the row using a webgrid utility function:
function UltraWebGrid1_CellClickHandler(gridName, cellId, button){ var row = igtbl_getActiveRow(gridName);}
Can you please send me a sample of handling this. Because I am not able to use the function igtbl_getActiveRow in my script?
Hi,
I tried to work out that and i was able to add the handler on client side. But the getActiveRow is returing "Object object" Instead of the row number.
So please suggest.
The code I used is below:
//Add code to handle your event here.
i = igtbl_getActiveRow(gridName);
alert(i);
}
ClientSideEvents AfterExitEditModeHandler="AfterExitEditModeHandler" AfterRowActivateHandler="UltraWebGrid2_AfterRowActivateHandler"
BeforeExitEditModeHandler="BeforeExitEditModeHandler" CellClickHandler="UltraWebGrid2_CellClickHandler" />
The igtbl_getActiveRow is one of the WebGrid CSOM Utility Functions. You should be able to find them in the docs.
I am trying to add at client using Javascript.
Are you trying to do this on the client (via javascript) or on the server?