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
795
Ultragrid handling old xml layout files
posted

I have removed a column from my datasource. But the users have the column saved in their previous old layout preferences files which they saved earlier. As suggested in other posts I have loaded a new UltraGridLayout object with that file. I now want to remove the specific column from that layout by doing 

 layout.Bands[0].Columns.Remove(column);

But it is returning an error for can't change/remove bound column. The layout object is still not bound or loaded to any grid. How can I remove that specific column from the layout so that when I load it to the grid then it does not return a error?

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    I think you probably have to load the layout into the grid first and then remove the column. At that point, the grid will know that there is no datasource column mapped to the column and it will treat it like an unbound column. I think that will work, although I haven't tried it out. If it doesn't work, please let me know and we will look into it further.

Children