2

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 or ColumnSetColumn property can only be set when the column belongs to a ColumnSet

Please help me, how to change columns indexes in janus grid component?

Behzad
  • 3,502
  • 4
  • 36
  • 63

1 Answers1

2

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

Ahmad Aghazadeh
  • 16,571
  • 12
  • 101
  • 98