Is there anything systematic (sorting, etc) that would cause a column's VisiblePosition to change after it is set in InitializeLayout? I am setting the value for each column, but the order I am setting is not being respected by the grid.
Thanks,
Hi,
You have to set the column's VisiblePositions in order, starting with 0 and working your way up.
What I usually do is built a List<UltraGridColumn> of the columns I want. Then I simply sort the list by the new VisiblePositions I plan to use because I start applying the properties.
I figured out the issue.
In the InitializeLayout method I was looping though the column collection and calling an ApplyColumnSettings method that set the VisualPosition along with some other formatting items. Since the list was not already in the order I wanted visually, the grid was getting confused about the order.
Does anyone have a good suggestion about sustainable ways to specify the column order so I can feed the grid the columns in the correct order? I am considering a method I can feed the columns collection to that would return a collection of keys in the visual order, but it sounds to me like that might be messy.