Hi,
i have a requirement where i need to fix 2-3 colums to the left of my grid and i dont want user to drag drop them. i am using the following code but it does not seem to work. please help.
];
.dataGrid.FixedColumnSettings.FixedColumnsLeft.Add(DisplayAsFixedColumn);
.dataGrid.FixedColumnSettings.FixedColumnsLeft.Add(DisplayAsFixedColumn1);
You can fix a column and set IsFixable=false and IsMovable=false to prevent the end user from unpinning and moving the columns.
For example:
Column dataColumn = this.XGrid.Columns.DataColumns["MyColumnKey"]; dataColumn.IsFixed = FixedState.Left; dataColumn.IsFixable = false; dataColumn.IsMovable = false;
HTH