How can I freeze last column of a datagrid in wpf?

Viewed 829

I have a wpf datagrid. I placed a delete button column at the end of each row. Since the datagrid containing more columns than its width, I should scroll to the end to see the delete button. Can I freeze the last column of datagrid?

2 Answers

Here is the my solution. You can define a class that derived from DataGridCellsPanel and override the ArrangeOverride method to calculate the arrangement of the last few columns to frozen them.

enter image description here

Related