Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
Saving layout
posted

Hi,

AM using wingrid 10.3

Saving layout as follows

grdData.DisplayLayout.SaveAsXml(path & "\" & strfname, PropertyCategories.All And Not PropertyCategories.ValueLists)

and laster reloading as

grdData.DisplayLayout.LoadFromXml(path & "\Layout", PropertyCategories.All And Not PropertyCategories.ValueLists)

It working fine, But if i add any new columns that are missing once layout loaded.

And also Columns that are not editable becomes editable.

Please help me

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Loading a layout into the grid will replace any existing layout information. The layout includes the columns and bands, so if you need to add new columns or make sure that some columns are not editable, you need to save a new layout with that information in it - or else you need to re-set those properties and add those new columns in after you load the layout.

    Another option would be to load the layout into an UltraGridLayout variable, instead of  directly into the grid.DisplayLayout. Then you can modify the layout and then use the CopyFrom method to copy the layout into the DisplayLayout.

Children
No Data