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.
Do you want the row at the bottom of the list? Or the bottom of the grid?
If you want to have a fixed row at the bottom of the grid, you would do something like this:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.FixedRowStyle = FixedRowStyle.Bottom; }
Then you just set the Fixed property on the row you want. The InitializeRow event would be a good place to set this.
If you just want the row to always be last in the sort order, then you would have to use a custom SortComparer on the column.
I want the row to be displayed at the bottom of the list.
I don't even need to compare the column values, need to just display the row as the last row based on the column value.
If SortComparer is only the way can you please provide me a sample code.