Skip to main content

Header.Serializatonstate

Comments

1 comment

  • Dapfor Team

    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 = 1

    Kind regards,
    Dapfor

    0

Please sign in to leave a comment.

Powered by Zendesk