Header.Serializatonstate
Hello..
I get the object[] from header.serializationstate
How to take out one by one column header from this object.
I would like to write column header in ini file.
if column order is like that. column1 column2 column3
I change to column3 column2 column1
I want to write to ini file for columnfield is like column3|column2|column1
after i load this file to grid . the column order will be column3 column2 column1
I don't want to save as xml or binary. I want to get column display order from after reordering.
I want to get the object or String of column order in latest display order.
Thanks for your support!!
-
Hello,
In this case header.serializationstate won't be useful. Since you are working with untyped data like object[], it's not enough to save only the column order. Each column has it's string identifier but if your data doesn't support string identifiers (in the case of object[]) cells display values by the index in the array. This index is attributed to columns in order they are added to header. If you reorder columns, they keep initial index, but visible index can differ.
Therefore when you restore data, you have to add columns to header respecting the order:
header.Add(column1)
header.Add(column2)
header.Add(column3)and then reorder them:
column1.VisibleIndex = 3
column2.VisibleIndex = 2
column3.VisibleIndex = 1Kind regards,
Dapfor0
Please sign in to leave a comment.
Comments
1 comment