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
320
WHDG ActiveCellChanged event not fireing
posted

I have a WHDG on my page and I am trying to resolve which cell the user clicks on.

I enabled activation on my grid, and set a clientside event where i can see what is clicked from javascript. I also added a eventhandler for Activation.ActiveCellChanged to handle the event server side, but it never gets called.

How can I have a event fired server side with the new selected cell?

  • 33839
    posted

    Hi Dotcomdist,

    You could try setting AutopostbackFlags on either Activation or Selection to true to have the server side event fire immediately after the client side event.  Whether it is async or full postback is controlled by EnableAjax of the grid itself.

    regards,

    David Young

  • 320
    posted

    Ok, I switched from activation to selection. I'm now getting server side events to fire on cell clicks. However unlike activation i don't seem to be able to figure out how to limit which columns will post back on selection.

    With activation i was able to use:

           function Report_Grid_ActiveCellChanged(sender, e) {
                var cell = e.getActiveCell();
                var column = cell.get_column();
                var key = column.get_key();
                if (key == 'rt_num') {
                    __doPostBack('<%= Report_Grid.UniqueID %>', '');
                }
            }

    How can i do this for selection.