Let's imagine that grid already bound to a data rows and has multiple columns.
I found that I can retrieve a given column position index by:
var fieldsLayout = grid.FieldLayouts[0];
var columnField = fieldsLayout.Fields.Single(f => f.Name == "Column Name");
int columnIndex = ... see below
columnField.Index
- If user does not changed an initial columns ordercolumnField.ActualPosition.Column
- If user has changed an initial columns order
The question is how to know whether an user has changed initial columns order?