Hi ,
I have a XamDataGrid
(WPF Infragistics control) which is bound to an observable collection. This observable collection is getting data from a database.
The working of XamDataGrid
is like this.
If no data from the database is returned (or initial opening of the window), the gridview will display 10 empty rows.
If data is loaded, the data should be bound to the grid + any empty rows. i.e. if 2 rows of data is returned, then show 2 rows of data + 8 empty rows.
For this requirement, I have bound empty objects to the collection to display empty rows.
When data is returned, these empty rows are removed and replaced by the actual objects. So the other rows remains empty.
All goes fine but it fails when I do sorting on the grid. If I click on sort
on the XamDataGrid
, the empty rows(empty objects) also get sorted.
It appears like this
Empty Row
Empty Row
Empty Row
Empty Row
Empty Row
Empty Row
Empty Row
Data1----row
Data2----row
Data3-----row
Requirement: I need the empty rows to be displayed always below the datarows.
Any suggestions on how to achieve the behaviour I am looking for?