Hopefully someone can point me in the right direction.
I have a Grid that i populate from a list that i get from my backend. it works great like this. i do have paging that works, but sorting is one i am having trouble with.
I set the allowsort property to true, but the columns do not allow me to click on them to sort.
6 Answers, 1 is accepted
Ensure that you are binding the grid via the NeedDataSource event:
And if you are using template columns, make sure that have their DataField and SortExpression properties set:
I hope this will prove helpful.
Thank you for your Help, However i am still unable to get sorting working.
At least now the grid does not disappear completely when i try to click on the sort option.
i did add a OnNeedDataSource="grdPNGrid_NeedDataSource" to my page and
to my code i added
Still i cannot seem to get sorting to work at all. the columns highlight as i would apply sorting, i even get the little arrow to signify ascending and descending sort but it simply will not.
I did have the grid inside of an updatepanel, i tried removing it, but it still does not sort. i also tried adding the radajaxmanager in a way that work, but even with it and the grid outside of the updatepanel, it did not load at all. so once i removed the updatepanel completely and kept the ajaxmanager, it still did not sort. i ususlly have to keep the radajaxmanager out as it causes problems with using the updatepanel.
I am totally confused at this point.
I am sending a sample RadGrid web site with working sorting functionality. You can use it as a base reference and built your configuration on top of it step by step.
Awesome, Thank you
. but i do not see what you have sent. i do not have anything in my email or here.
Yes, you need to have RadGridSortBasicSample.zip sample attached to the previous post. I am also attaching it to this reply.
If you don't see the sample once again, you can check for spam filter of your company.
Awesome, again Thank You.
for me the previous post did not have the file attached but this one did.
i will see what i can do with it.