HI all,
I'm wondering what's the "correct" way to handle the Row-/Column-/CellSelectionChanged-events in the browser. ASP.NET AJAX already provides an event framework, the WebDataGrid, however, seems to roll its own implementation here.
Please have a look at the attached example: Grid 1 assigns the handler on the server side, in grid 2 i tried to assign handlers through 'addClientEventHandler' (does not work) and in grid 3 i've used the 'setClientEvent' function instead (works).
So i can get it to work after all, however only by using the 'setClientEvent' function which is documented as being "For internal use only". And there's a downside to using that function: The grid's 'clientEvent' implementation allows for only one handler at a time, whereas with ASP.NET AJAX, i can attach several.
Hi Olga,
i've suspected as much, thanks for verifying this. Since we also need the grid to create a client-side event if the selection is cleared, i've wrapped that functionality in a custom extender control and let the scripts target that instead.
Best regards,
Dominik
Hi,
I am not sure what the question in the post is. I took a look at your sample and the way you assign events for grid G1 is how the event handlers should be assigned. If you want multiple functions to receive this event, you can always have your handler call these functions passing the parameters to them.
Thanks,Olga