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
95
XML Load-On-Demand child row click event
posted

I have a 7.3 UltraWebGrid bound to a two-table hierarchical dataset. It loads and works fine, i.e. the parent rows load first and when you click to expand a parent row, it then pulls down and loads the related child rows. Here is my question: When I click on a child row, what event is fired? Clearly, it is causing a postback, but it is not firing SelectedRowsChange or ActiveRowChange as I would have expected. I am not doing any updates, I simply need to capture the row being clicked. Am I missing something here?

Parents
No Data
Reply
  • 2197
    posted

     Hello.

     Clicking a child row will activate it just like any other row. What is the grids DisplayLayout.CellClickAction property set to? This will determine the action that is taken when a cell is single clicked. In order to get the grid to post back when you click, you have to handle the grids server side Click, DblClick, ActiveRowChange, ActiveCellChange, ExpandRow, CollapseRow, SelectedCellsChange, SelectedRowsChange, or SelectedColumnsChange events. Does it post back when you click a cell in the child row and not in the parent row? There are no events specific to child rows being activated or de-activated. You can handle the various row events and look at the eventargs to determine which row caused the action.

    On the client there are some events that fire: BeforeRowActivate, AfterRowActivate, BeforeRowCollapsed, AfterRowCollapsed, BeforeRowExpanded, AfterRowExpanded, BeforeSelectChange, AfterSelectChange, CellClick, DblClick, RowSelectorClick, and others. What client and server side events do you have handled? Are you causing a postback from a client side event?

Children