This seems pretty forward to me? I bind the grid and then the RadComboBox in the filter. Everything looks fine. I do the exact same thing after the sort, and the options are gone.
Any help would be appreciated!!!
7 Answers, 1 is accepted
I tried to replicate your issue,but no avail. I guess you want to add a FilterTemplate to a column. Please have a look at the below code snippet.
Hmmm.... That doesn't really help me figure out why my code isn't working....
The problem happens when you try to sort the grid. Actually, it also happens if you use the paging, change the page size, etc.
I posted an example of it here: http://www.thelukenfamily.com/temp.aspx Go to that link, and notice that there are 3 filter options inside the FS Market RadComboBox. Then, try to sort the grid. If you now go into the filter options, the RadComboBox is empty. It is almost like the RadComboBox isn't being updated, despite being inside the RadGrid, which has been ajaxified. Here is the complete source code for that example:
This example doesn't have the filters actually wired up, but when they are wired up, the filters work fine. What I can't figure out - when I sort the grid, I rebind the grid, and I also rebind the filter options. But it doesn't update them....
Any ideas? Is there another way to add the RadCombiBox to the list of updated controls if that is the issue?????
I noticed that you are using simple data binding for the RadGrid control. This type of binding is generally used when you do not need the RadGrid to perform complex operations like filtering, grouping, insert/update/delete, etc.
Try using advanced data binding for the RadGrid as it is designed to handle more complex scenarios like the one you would like to implement. You could use the NeedDataSource event or set declarative data source for the RadGrid. You could find an example for RadGrid with enabled filtering and sorting in this online demo. Also an example on setting the datasource for the RadGrid with NeedDataSource could be found here.
Are we stumped here? Are you able to see the problem we are having with the sort column? Does anybody have any idea what is causing this, and how to resolve it (workarounds, etc) when utilizing the grid like we are using it?
Simple data binding (using DataBind() method) for the RadGrid is generally used in simple cases like when you would like to only display some data without anything more.
I am not sure why a complex scenario for the RadGrid would drive you away from advanced data binding. If you would like you could set data source declaratively instead of using NeedDataSource. Both methods for advanced data binding are designed to handle complex operations for the RadGrid like filtering, sorting, paging, etc. As the similarity in the names suggests simple databinding is for simple scenarios and advanced databinding for complex scenarios.
If you need advanced functionality of RadGrid like paging, sorting, grouping, filtering, the only supported way of using it is by implementing advanced data binding for the RadGrid. Give this approach a try and you should be able to get the result you are looking for.
I am glad to hear that you have resolved the issue.