Home › Forums › WinForms controls › Xceed Grid for WinForms › Sorting a detail grid programatically.
I have a master/detail grid that I bind to a Dataset. Everything works fine with that. When i click on the header in the detail grid it sorts like I would expect. How do I programatically do this?
I was trying something like.
Dim mydtgrid As DetailGrid mydtgrid = Me.GridControl1.DetailGridTemplates(0) mydtgrid.Columns(1).SortDirection = Ascending
it tells me my detail grid doesn’t have any columns even though it does.
Imported from legacy forums. Posted by wcombs (had 1912 views)
The way in which I’ve done it is to add the rows I want to sort on into the SortedRows property of the detail grid you’re interested in.
Imported from legacy forums. Posted by Chris (had 2974 views)