I was sure I was going to have problems with my no native solution for filtering row with DG frozen row

Answered
0
0

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?

 

 

 

Attachment
  • You must to post comments
Best Answer
0
0

The answer of this issue is: .SortFrozenRows = False

As you may see you have a native solution for this.

Kind regards!

  • You must to post comments
0
0

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

  • Frank (ITG)
    Please provide a test case. Best regards, Frank
  • mgmst
    • mgmst
    • Sep 9, 2023 - 2:30 pm
    Would you please provide me with short demo case in which your code works :) Thank you!
  • You must to post comments
0
0

Hi,

you can add code like this to exclude frozen columns from being sorted:

dgv_sort_frozen

 

 

 

 

 

Best regards
Frank

  • mgmst
    • mgmst
    • Sep 9, 2023 - 7:48 am
    THANK YOU!
  • You must to post comments
0
0

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.

  • You must to post comments
0
0

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

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.