Hi
I am using UltraWinGrid in Infragistics NetAdvantage 7.1 and have a small issue with column sorting.I have a grid and i allow sorting of all columns.Let's say i have 5 rows of data and i am sorting by column 1.If i go to the row 5, column 1, and edit the value there, and once i tab out, it automatically sort the rows and put the active row, say to the 3rd position.1) Is there a way to temporarily disable the automatic sorting so that user can focus on edit a specific row and not distracted by this automatic sort?2) There is a BeforeSortChange event, which got fired after user click on the column header to sort. Is there any event like BeforeSorting ??? In other words, if i can capture the events of the editing scenario above, then i can just mark the event as handled.
Please advise. Thanx.
Hi,
nkang08 said:1) If I use the datarow.SetRowCount. The grid will do the automatically resort the data.
I'm afraid I do not understand. There is no SetRowCount method on DataRow that I can find. Do you mean UltraDataSource? If calling SetRowCount on UltraDataSource is sorting the grid, then something is wrong there. That should not be happening.
nkang08 said: 2) If I use the rows.add to add datarow one by one, the grid won't do the resorting automatically. However, seems the performance is bad. If add many rows, it is very slow.
2) If I use the rows.add to add datarow one by one, the grid won't do the resorting automatically.
However, seems the performance is bad. If add many rows, it is very slow.
This depends on what your data source is and how you are adding the rows. You might want to check out the WinGrid Performance Guide for information on how to improve the performance.
nkang08 said:Another issue, after I add datarow data row one by one. It wont' automatically show on grid.
If the rows are not displaying in the grid automatically, it means your data source is not sending notifications to the BindingManager in DotNet. What kind of data source are you using?
I figured out:
1) If I use the datarow.SetRowCount. The grid will do the automatically resort the data.
Another issue, after I add datarow data row one by one. It wont' automatically show on grid.
I have to call addrow.active() to make the added rows show on grid. Is any better way?
firing the list collection changed event?
The grid does not automatically re-sort the data. If that's happening, then something in your code is triggering it.
If you are sure you are not calling RefreshSortPosition of SortedColumns.Refresh, then the only other reason I can see for this to happen is that you are re-setting the grid's DataSource and the grid is picking up the order of the items in the DataSource.
If that's not the case, then we will need you to provide a small sample project demonstrating this behavior so we can check it out.
Sorry, missing the "NO".
nkang08 said: Hi, I have the same issue. In my code there is "NO" RefreshSortPosition and SortedColumns.Refresh. The only thing I did is : add new row to data row. Then activate the grid. So the infragistics grid automatically sort. That's not the behavior I want.
I have the same issue. In my code there is "NO" RefreshSortPosition and SortedColumns.Refresh.
The only thing I did is : add new row to data row. Then activate the grid. So the infragistics grid
automatically sort. That's not the behavior I want.
I have the same issue. In my code there is RefreshSortPosition and SortedColumns.Refresh.