Fixed separator lines
I have a requirement to add "separator" lines to a non hierarchical grid. For example: I'm adding 10 lines to a grid (Rows.Add(BusinessObject)) and after row 5 I would like to insert an empty line. I can do this using the childindex property but the tricky part is that the user wants to be able to sort the grid and still have the separator line at a fixed location (the 5th line)
Any idea how to solve this using dapfor grid?
-
Hello,
Did you see docked rows? The idea is that they stay in their positions regardless of sort. You can add 5 first rows, then add a separator. and all of them dock to the top.
Row row = Rows.Add(BusinessObject);
row.Dock = RowDockStyle.Top;Regards,
Dapfor0 -
I was able to achieve the required functionality using grouping.
Thanks for the quick support!
0 -
Great!
You can also achieve the requested feature by using the ICustomSort interface. You have to compare row1.VisibleIndex with row2.VisibleIndex, but row grouping may be a better solution.
Regards,
Dapfor0
Please sign in to leave a comment.
Comments
3 comments