G
Guest
I need to sort a DataGrid on a specified column without requiring the user to click a column header. How do I do this programmatically?
Normally I would set the DataGrid DataSource to default or custom DataView and set the sort property, but in this case the DataSource is a ChildRelation.
Read on if you need more explanation.
I have two DataGrids on this particular Windows Form.
The first has DataSource set to a DataView on a table in my DataSet which is a parent in a relation. This allows the parent grid to display filtered and sorted data.
The second DataGrid DataSource is the same DataView with DataMember set to a ChildRelation. This allows a user to move through rows on the parent table grid and see the related rows on the child table grid.
The problem is that I can set a filter and sort on the parent table DataSource but not on the child table. A sort is required on the child table, and I can't expect the user to click on a column header to do it.
Any ideas are alternate approaches? Thanks.
Normally I would set the DataGrid DataSource to default or custom DataView and set the sort property, but in this case the DataSource is a ChildRelation.
Read on if you need more explanation.
I have two DataGrids on this particular Windows Form.
The first has DataSource set to a DataView on a table in my DataSet which is a parent in a relation. This allows the parent grid to display filtered and sorted data.
The second DataGrid DataSource is the same DataView with DataMember set to a ChildRelation. This allows a user to move through rows on the parent table grid and see the related rows on the child table grid.
The problem is that I can set a filter and sort on the parent table DataSource but not on the child table. A sort is required on the child table, and I can't expect the user to click on a column header to do it.
Any ideas are alternate approaches? Thanks.