How to Freeze First Column of WPF DataGrid [duplicate] How to Freeze First Column of WPF DataGrid [duplicate] wpf wpf

How to Freeze First Column of WPF DataGrid [duplicate]


Set the Datagrid's FrozenColumnCount = "1".

<DataGrid FrozenColumnCount ="1" Name="dgQuestionTemplate" HorizontalAlignment="Left" Grid.Row="1" Width="870" HorizontalScrollBarVisibility="Auto" IsReadOnly="False">

Frozen columns are columns that are always displayed and cannot be scrolled out of visibility. Frozen columns are always the leftmost columns in display order. You cannot drag frozen columns into the group of unfrozen columns or drag unfrozen columns into the group of frozen columns.

DataGrid.FrozenColumnCount