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
50
AJAX enabled hierarchical grid row selection
posted

Hi,


I have a ajax enabled hierarchical grid (with server side sorting, client side filtering and paging). I am also subscribing to the OnActiveRowChange event.

I am trying to select a child row, which will set a session variable based on the row id. But every time I select a child row, the grid performs a post back (as expected) and on the return the grid collapses the parent row I expanded and thus my child row is not selected.
Now, the grid does not collapse the parent row if I disable AJAX and my child row is selected. Is there any way to get this behaviour with AJAX enabled?

Thanks.

Parents
  • 205
    Offline posted

    I have a similar problem using Webgrid 8.2 developed under Visual Studio 2005, VB.Net.

    Issue 1 

    I have the WebGrid and Button1 on UpdatePanel1.  Via the row selector column, I select a row ( the row highlights ).  Button1 triggers VB.Net code behind function that uses the "rowA = grid.DisplayLayout.ActiveRow" and attempts to retrieve column 1 value.  However, rowA is Nothing, the UpdatePanel1 WebGrid refreshes and the ActiveRow grid highlight disappears.

    Issue 2

    I have the WebGrid on UpdatePanel1.  Via the row selector column, I select a row ( the row highlights ).   I have 2nd UpdatePanel2 with a Button2 that runs a VB.Net code behind function.  "rowA = grid.DisplayLayout.ActiveRow" and attempts to retrieve column 1 value.  However, rowA is Nothing, the UpdatePanel1 WebGrid does not refresh and the ActiveRow is still highlighted.  If I run UpdatePanel2 Button2 again, the ActiveRow is found and I can retrieve a value

    If I change the ActiveRow and run UpdatePanel2 Button2, the ActiveRow is the previous row.  I have to run UpdatePane2 Button2 a 2nd time to get the correct value.

    - Thx

     

     

     

     

     

Reply Children
No Data