Hi team.
I was sure I was going to have problems with my no native solution for filtering row with DG frozen row.
But for some reason you stubbornly refuse to made so needed DGrid filter row native solution.
Also for kind of answers like – use third party component – I wont use thurs party component because there is no better that native solutions and because with third party component I will never get so full control over the component properties events and behavior.
So, what is my problem:
It is ridiculous: my frozen filter row resorts when I reorder some column of the grid. Please find image attached.
What to do with this?
The answer of this issue is: .SortFrozenRows = False
As you may see you have a native solution for this.
Kind regards!
Hi Frank,
Your code do not works.
It executes for the frozen filter row but still frozen filter rows goes last row as result of sorting. Frozen filter row should be always the top row. That is why it is “Frozen”.
Private Sub CDataGRid_FILL_SortCompare(sender As Object, e As DataGridViewSortCompareEventArgs) Handles Me.SortCompare
Dim odgridrow As DataGridViewRow = Me.Rows(e.RowIndex1)
If odgridrow.Frozen = True Then
e.SortResult = -1
e.Handled = True
End If
End Sub
Hi,
you can add code like this to exclude frozen columns from being sorted:
Best regards
Frank
Hi Frank,
My issue is visible on the screenshot I attached. My issue is that when some column is sorted, my frozen filter row (in yellow) loses its position as the first row and goes last row in the grid’s rows list.
I want my filter row to be the first row in the grid in all possible sorting scenarios.
Hi,
is your issue that frozen rows are not sorted? If yes, you could handle the row compare event and customize your sorting.
For filtering we provide ColumnFilter extensions that can be used as a base implementation.
Or you could add an editable control to the Column headers.
Currently we do not have plans to add a filter row given the extensive integration with the server data that is implemented in our grid.
Third party grids with very little server integration are a great alternative in that case.
Best regards
Frank
Please login first to submit.