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
250
UltraGridLayout.Clone without unbound columns
posted

I want to get rid of previously added unbound columns. My way is to clone the UltraWinGrids DisplayLayout without unbound columns and load this layout.

But my clone contains also unbound columns. What am I doing wrong? Here is my code:

UltraGridLayout l = ultraGrid1.DisplayLayout.Clone(PropertyCategories.Bands);
ultraGrid2.DisplayLayout.Load(l, PropertyCategories.Bands);

Any help is appreciated.

  • 12480
    Verified Answer
    Offline posted

    Hi Martin,

    You can clear the unbound columns in all bands by using the ClearUnbound method:

     foreach (var band in this.ultraGrid1.DisplayLayout.Bands)
        band.Columns.ClearUnbound();

    Please try this code out and let me know whether it works for you.