I try to get the ColumnNames and the current Vieworder of my GridControl. The docu won't help me an the ".Net Reflector"-Tool also won't give me advice.
The tip from an other stackoverflowpost ( How to hide column of devexpress XtraGrid ) also won't help me, because, i can't access View.Columns
I suggest you are trying to use property gridControl.MainView to access a view. This property is of type BaseView (base class for all views) so in order to access columns/order information you should cast it to GridView (or whatever type you are using):
var firstColumnName = ((GridView)gridControl.MainView).Columns[0].FieldName;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With