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
115
Infragistics.UltraWinGrid problems adding a column after DisplayLayout.LoadFromXml
posted

I have an untrawingrid bound to a custom collection.

There is a DisplayLayout that we've serialized to XML that we share with users. 

We want to add an unbound column after the user loads the grid's displaylayout.  The sequence looks like this:

Dim stream As New IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(LayoutString))
myGrid.LoadFromXml(stream, PropertyCategories.All)
myGrid.DisplayLayout.LoadFromXml(stream, PropertyCategories.All)

which works wonderfully.  All the default columns and sizing/sorting/etc. is persisted.

However, when we try to add a column, it winds up overwriting an existing column (being displayed, but not in the underlying object itself, it seems):

myGrid.DisplayLayout.Bands(0).Columns.Add("isLocked")

As soon as we do this and the grid is refreshed, a column that used to be displayed is renamed "isLocked".

Looking at the displaylayout columns in code, everything seems fine, but the overwritten column will no longer be displayed.

Here's the displaylayout loaded:

here's what happens after calling myGrid.DisplayLayout.Bands(0).Columns.Add("isLocked"):

I feel like I'm doing everything right and maybe this is just a bug in the grid?

Parents Reply Children
No Data