How to make a row display always as the last row based on its cell value?
I have sorted the rows based on some column value. But there is a row which I need to display always as the last row irrespective of the sorting order. How can I do this?
Thanks.
Thanks a lot Mike.
That helped.
Hm, that shouldn't be. So the rows are scrolled out of view? That probably happens because the grid is trying to maintain the same first visible row after the sort.
You should be able to correct it by using the grid.ActiveRowScrollRegion.Scroll methods to scroll to the top after you Move the row.
Yes MIke, As I told you in my last post, If I try to call the Move method in Form_Load after the loop, the grid is not displaying all the rows. It is displaying only the row with the cell value E.
This happens only when the first row has the cell value E.
Okay, so then you need to call the same method to Move the row after the grid is loaded and sorted the first time. You can probably do it in Form_Load, right after the loop that finds the row and stores it.
Thanks Mike.
The sample you gave works well on HeaderClickAction.
But I need my grid to be sorted when it is loaded.
I tried placing the Move in the formLoad after the for loop. If I do this, all my rows are not displaying in some cases.