I'm using an UltraWinGrid that's bound to a IList of AccountRecords. I diligently laid out the Grid in the designer and hid many fields, but later had to go back and add another property to the AccountRecord class. When I ran the app again, every single item in the AccountRecords was visible, and the editor appeared to believe I had not bound to a DataSource.
At first I wrote it off as "one of those things", but when I did the same to my QuoteRecord the same thing happened to the two grids that used it.
This is very annoying. Is there any way to avoid this?
Maury
Hi Maury,
I'm not really sure I understand what you mean. It sounds like your grid is losing the layout. This will happen any time the DataSource sends a Reset notification to the grid.
There may be a way to get around this, but it's hard to say without more information to go on. For instance, are you modifying your data source at design-time or run-time?
You might want to check out this KB article, also: HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?
Mike Saltzman"] I'm not really sure I understand what you mean. It sounds like your grid is losing the layout. This will happen any time the DataSource sends a Reset notification to the grid.
Yes, the layout is being lost. However, all I am doing to cause this is change an object in a completely different part of the solution.
For instance, I had a Grid of Users, which had FirstName, LastName and PhoneNumber. I laid out a grid with just the first and last names and everything was working fine. Then I went to the User class and added MiddleInitial, and when you open the Grid again all four fields are visible - PhoneNumber re-appeared.
Additionally, the Grid designer appears to believe that there is no DataSource bound it it, forgetting the source I had before. I can reset this easily enough, but why is it forgetting just by changing an underlying object?