This example demonstrates how to provide the capability to fix a row in GridControl.
Our GridControl doesn't have the capability to fix a row. So, to provide this capability in this sample, we manipulate
the child collection of the HeirarchyPanel. We add a StackPanel with a collection of editors to the child
collection of the HeirarchyPanel and bind them to respective cells of the selected row. Then, we assign
it to a ScrollChanged event of the ScrollViewer. When ScrollChanged raises, we change the location of the StackPanel, so it is always displayed on the top of the grid view.
Please note, that this approach is not compatible with Bands and Conditional Formatting. Also, a fixed row may not be displayed immediately when PerPixelScrolling is enabled.
Added By: Yuriy Plitman at: 8/25/2016 4:08:52 AM Hi,
Thanks for the example.
However in my case I need explicitly excluded variant with conditional formatting. The celltemplate of my fixed row is assigned by CellTemplateSelector.
What should I do in this case?
Many thanks in advance.
Regards
Yuriy
Added By: Alexander Rus (DevExpress Support) at: 8/25/2016 8:23:21 AM
Our GridControl doesn't have the capability to fix a row. So, to provide this capability in this sample, we manipulate
the child collection of the HeirarchyPanel. We add a StackPanel with a collection of editors to the child
collection of the HeirarchyPanel and bind them to respective cells of the selected row. Then, we assign
it to a ScrollChanged event of the ScrollViewer. When ScrollChanged raises, we change the location of the StackPanel, so it is always displayed on the top of the grid view.
Please note, that this approach is not compatible with Bands and Conditional Formatting. Also, a fixed row may not be displayed immediately when PerPixelScrolling is enabled.
Question Comments
Added By: Yuriy Plitman at: 8/25/2016 4:08:52 AM Hi,
Thanks for the example.
However in my case I need explicitly excluded variant with conditional formatting. The celltemplate of my fixed row is assigned by CellTemplateSelector.
What should I do in this case?
Many thanks in advance.
Regards
Yuriy
Added By: Alexander Rus (DevExpress Support) at: 8/25/2016 8:23:21 AM
Hello Yuriy,
I've created a separate ticket on your behalf (T419250: Fixed rows in GridControl). It has been placed in our processing queue and will be answered shortly.
Thanks,
Alexander