Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
Handling *SelectionChanged-events in JavaScript through the CSOM
posted

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.

Controls.zip
Parents
  • 2783
    Verified Answer
    posted

    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

Reply Children
No Data