Hi,
I have Ultra Grid in windows application. I want to change column display order at runtime.
I'm wondering if there is a way to change the display order of column. Please help me ASAP
I've contacted support using the live chat and the solution for the UltraWebGrid is to use the Columns[0].Move() method.
It should be available in UltrWebGrid also. But I dont have any idea about UltraWebGrid. Do One thing write a new post in UltraWebGrid option.
This property is not available for the UltraWebGrid?
Yes, use the InitializeLayout event and set the column.Header.VisiblePosition on each column. Note that you must set the columns in order so as to prevent the positoin of one column from interfering with another.
So this is correct:
e.Layout.Bands[0].Columns["My First Column"].Header.VisiblePosition = 0;
e.Layout.Bands[0].Columns["My Second Column"].Header.VisiblePosition = 1;
e.Layout.Bands[0].Columns["My Third Column"].Header.VisiblePosition = 2;
This would be wrong:
e.Layout.Bands[0].Columns["My First Column"].Header.VisiblePosition = 2;
e.Layout.Bands[0].Columns["My Second Column"].Header.VisiblePosition = 0;