Hi,
I have an interesting issue. We have a grid with items. When a user adds a new item we refresh the datasource (SQL data table connected to a data adapter) and 99% of the time the new item appears at the bottom of the grid.
Sometimes though it appears as the 2nd row. How does the grid determine the sort if no sort is applied?
Thanks,
M.
Hello,
UltraGrid shouldn't be doing anything to sort items when no sort is applied -- it should display them in the order that they exist in the data source.
Is it possible that items are getting added to the data source out of order? If this is happening, then the grid would be expected to reorder items after rebinding.
If you need to have the items sorted in a specific way, my recommendation is to apply a sort. You can sort based on something like a primary key or an ID field that maintains the order rows were added. You can sort on such a field even if it was hidden from end users.
Finally, if the grid is definitely showing items in a different order than the data source, then this is unexpected behavior. In order to investigate in this case, we will need a reproduction sample.
Please let me know how you choose to proceed.
For sure we are not applying a sort and we are just refreshing the data source through the adapter. I have a specific project and database where this happens consistently....how would I be able to upload to you a large project and database so that you can see?
Thanks,Michael
I've opened a private case and emailed you a link that you can use to upload your project.