Losing radgrid selected row state after executing ajaxRequest('argument')

3 posts, 1 answers
  1. Cem Sisman
    Cem Sisman avatar
    5 posts
    Member since:
    Dec 2009

    Posted 15 Feb 2010 Link to this post

    Please see attached files as I took screenshots of the code blocks. As i mentioned in the title, when I call ajaxRequest function radgrid losing its selected states.

    thanks

    Cem
  2. Answer
    robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 16 Feb 2010 Link to this post

    In order for the grid to remember the client-side selection in the way your performing the ajax request, you need to pass the select rows index by calling args.get_itemIndexHierarchical() and passing it in your ajax request, so you can select it in the ajax request event server-side.

    This is the only way to do this if you want to call the ajax request yourself. 

    I think a better way would be to set ClientSettings.EnablePostBackOnRowClick="true" and handle the SelectedIndexChanged event of your RadGrid and let the RadGrid postback, instead of forcing the RadAjaxPanel to make an ajax request, thus the selected row will retain its state when the ajax request completes.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cem Sisman
    Cem Sisman avatar
    5 posts
    Member since:
    Dec 2009

    Posted 16 Feb 2010 Link to this post

    EnablePostBackOnRowClick thats what I was looking for, it does the trick,

    thank you very much for your help.

    Cem
Back to Top