Hello,
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;
GridColumn c;
string[] sOrder = new string[grid.Items[0].Cells.Count];
for (int i = 0; i < grid.Items[0].Cells.Count; i++)
{
sVal = grid.Items[0].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?