I am trying to capture the order of columns headers after a user changes (re-orders) a column in the Grid. But so far I only seem to capture the original order.
I plan to store the order in the database, and when the grid is loaded re-order the columns for each user.
Here's a code snip that gets called after a user changes a column: (always gets original order)
string sVal = "";
GridColumnCollection cols = grid.MasterTableView.Columns;
string sOrder = new string[grid.Items.Cells.Count];
for (int i = 0; i < grid.Items.Cells.Count; i++)
sVal = grid.Items.Cells[i].ID.ToString();
c = cols.FindByUniqueNameSafe(sVal);
sOrder[i] = sVal + ":" + i.ToString();
How do I get the actual order of columns after they are changed by the user?