Posted 2 March 2021, 5:11 pm EST
The columns in the C1GanttView grid can reordered at runtime using the Grid Columns dialog. How can this be done in VB.NET code at runtime?
Forums Home / ComponentOne / WinForms Edition
Posted by: john.morrelles on 2 March 2021, 5:11 pm EST
Posted 2 March 2021, 5:11 pm EST
The columns in the C1GanttView grid can reordered at runtime using the Grid Columns dialog. How can this be done in VB.NET code at runtime?
Posted 3 March 2021, 5:38 am EST
Hi John,
You can use the code snippet given below on a button click or any specific event to move the columns from one position to another:
Dim col As TaskPropertyColumn = C1GanttView1.Columns(colindex)
C1GanttView1.Columns.Remove(C1GanttView1.Columns(colindex))
C1GanttView1.Columns.Insert(newPosition, col)
If you need any other help, please let us know.
Regards,
Prabhat Sharma.