HI, I've a DataGridView with this setting: d
dataGridView1.AllowUserToOrderColumns = true;
(so the users can reorder columns)
My problem is that I want to know the current order of columns. I've done this methond:
public List<int> getActualTaskOrder() {
List<int> ris = new List<int>();
int i=1;
while(i<this.dataGridView1.Columns.Count){
DataGridViewColumn c= this.dataGridView1.Columns[i];
if (c.Name != "**")
{
Console.WriteLine(c.HeaderText);
ris.Insert(c.Index-1, System.Convert.ToInt32(c.Tag));
}
i++;
}
return ris;
}
my problem is that the result (the order of columns) is always the same (also if I move columns in my gui)