Hi Mark,
Here is some code snippet that sorts the child table records programatically:
DataView dv;
bool True;
private void buttonAdv1_Click(object sender, System.EventArgs e)
{
GridBoundRecordState rs;
int pos = this.gridDataBoundGrid1.Model.RowCount;
for(int i = 0; i
{
rs = this.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(i);
True = rs.HasChildList;
// Check whether there are child records
if(True)
{
dv = rs.ChildList as DataView;
if(dv != null)
{
// Sort
dv.Sort = "ProductName DESC";
this.gridDataBoundGrid1.RefreshRange(GridRangeInfo.Rows(i + 1, i + rs.ChildCount));
i += rs.ChildCount;
}
}
}
}
Here is a sample.
ChildTableSorting.zip
Best Regards,
Haneef