i have a grid,i want to save the name of the columns in a file after i change the order of the columns (by drag and drop), i have tried to loop on the columns but every time in return the columns with its initial stat (before i change the order of the columns)
how can i do that?
thanks
To get a column visible position check this: column.Header.VisiblePosition
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v8.3~Infragistics.Win.UltraWinGrid.ColumnHeader~VisiblePosition.html
Hi,
The above link is not working ,actually i also want to save the multiple column bound, I'm able to save single column soft order ,but not able to do same with multiple column rows.
I'm not sure what you mean by "multiple column rows." If you just want to save the order of your columns in the grid, then the simplest thing to do is use:
grid.DisplayLayout.Save or SaveAsXml. That will save the entire layout of your grid.
The link above is to an old version, which is why it's no longer working. But it's really not neccessary. It's just a link to the topic for the VisiblePosition property on the column header:
grid.DisplayLayout.Bands[0].Columns[0].Header.VisiblePosition
Here's an updated link:
https://es.infragistics.com/help/winforms/infragistics.win.ultrawingrid~infragistics.win.ultrawingrid.columnheader~visibleposition
But as I said, it's better to just save the layout, rather than trying to manually implement saving and loading the column positions yourself.