Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Sort order not preserved when adding UltraDataRow
posted

We have an UltraGrid bound to an UltraDataSource.  We programmatically add rows to the data source by creating a new UltraDataRow, setting a tag on the new row, then using UltraDataRowsCollection.Add() to add the new row to our rows collection.  Subsequently, our CellDataRequested event handler is invoked, whereupon we use the tag set on the row earlier to look up the data for the row.

Our problem is this: new rows added in this way always appear at the bottom of the grid, irrespective of any sort order the user has selected by clicking on column headings.  After new rows have been added, I can click again on column headings and the sort order is enforced correctly.  I need my new rows to appear in the correct part of the grid, according to the sort-order currently in force.  How can I make that happen?

Thanks!