This is a migrated thread and some comments may be shown as answers.

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

2 Answers 165 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Cem Sisman
Top achievements
Rank 1
Cem Sisman asked on 15 Feb 2010, 03:24 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
robertw102
Top achievements
Rank 1
answered on 16 Feb 2010, 03:21 PM
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.
0
Cem Sisman
Top achievements
Rank 1
answered on 16 Feb 2010, 04:55 PM
EnablePostBackOnRowClick thats what I was looking for, it does the trick,

thank you very much for your help.

Cem
Tags
Ajax
Asked by
Cem Sisman
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Cem Sisman
Top achievements
Rank 1
Share this question
or