Applying SortedColumns along with RetrieveStructure

4 replies. Last post: June 16, 2010 9:09 AM by Brad Loveall
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Brad LoveallMember

I am using the WebGrid in two scenarios, one where the columns are known and added in the aspx page and the other where the columns are dynamic and not known and in that case we rely on the RetrieveStructure method. In some cases, we are sorting the grid at runtime via Me.RootTable.SortedColumns.Add(New WebGridGroup("PersonName", 2)). When we run this code and the columns are known at design time, it works fine, i.e., the grid is sorted correctly. In the cases where we have to call RetrieveStructure, on the other hand, and we run the same code, the grid is not sorted on the columns that we specify. So my question is: when we have a grid where the columns are not specified, at what point do we call Me.RootTable.SortedColumns.Add()??? A second question is whether or not there is some other code that needs to be executed in RetrieveStructure scenarios in order to sort.

Thanks,

Brad

All times are GMT -5. The time now is 9:48 PM.
Previous Next