Reputation: 3590
I use Janus component in winForm application.
Now, I want to set column index of GridEX
control, so I use below codes to do it:
grd.RootTable.Columns("ColumnName").Index = 1
or
grd.RootTable.Columns("ColumnName").ColumnSet = 1
but, both of them are readonly properties. Then I test below codes:
grd.RootTable.Columns("ColumnName").ColumnSetRow = 1
or
grd.RootTable.Columns("ColumnName").ColumnSetColumn = 1
but, an exception by below details occurred:
ColumnSerRow
orColumnSetColumn
property can only be set when the column belongs to aColumnSet
Please help me, how to change columns indexes in janus grid component?
Upvotes: 2
Views: 3632
Reputation: 17131
You must use Position
property in GridExColumn
object. So your codes should be like this:
grd.RootTable.Columns("ColumnName").Position = 1
Now, The column which is name ColumnName
moved to index 1
Upvotes: 2