I and other developers on my project have had numerous issues with losing all our columns settings on UltraGrids. It's become comical it happens so often. The column settings we lose are anything below the DisplayLayout->ColumnCollection. Column header captions, custom editor control settings, which columns from the data source are hidden, widths... etc.
All our grids are SingleBand and MaxBandDepth of 1 (because otherwise the dev environment will lock up as reciprocal references in the object graph seem to loop forever in UltraGrid. And the default Max Depth of 100 is insane. So if you don't remeber to set it to 1 and SingleBand only, you just lost whatever wasn't saved. Anyhow, atleast that issue has a workaground. Back to the more annoying problem...)
Our datasources are objects from an NetTiers entity layer. The collections types we're binding to are you standard MS example code for bindable data sources. They implement all the interfaces you would expect.
It's difficult to constantly reproduce this using the GUI editor (ultra designer). There appears to be some way where if you make sure: 1) You never hit the cancel button (cancel = reset all columns every time)2) Make sure every time you go into the Ultra Designer you break down the band and open up the column designerthen you have about an 80% chance of after hitting OK, all your columns not reverting to defaults (as if it just was attached to the datasource for the first time).
If i want to make this happen everytime the easiest way I've found is the following:
1.) Click on an UltraGrid bound to a collection source2.) Use the visual studio default Properties grid to navigate down DisplayLayout->Bands[0]->Columns: (Collection)3.) Click on the ellipsis to bring up the Column Collection editor4.) Hit Cancel and cry as every column reverts as if the whole band is being reset. This happens everytime. Sometimes you can open up the designer generated file and use 'undo' to restore what the cancel deleted/changed. Which is pretty silly. After all, the whole point of a cancel, especially when you've made no changes to the state, is to leave whatever it is you are messing with in the same state as when you started. Which seems a pretty simple thing to do when you don't even mess with the state. Atleast, it should be.
At the very least, if the cause of this massive headache is something complicated or part of .Net binding sources or Visual Studio or whatever, what I'd REALLY like to see is the following message box:
"WARNING! The changes you have made will cause the UltraGrid to recreate the column collection from the Data Source. Any column-specific metadata will be lost and reverted to default values. Are you REALLY SURE YOU WANT TO DO THIS DAVE?"
I wouldn't even make is a Yes/No box. because no-one is ever going to hit Yes. Just make it default to NO. If someone really wants to reset their columns they'll un-set and re-set the datasource property.
It would be nice if someone from Infragistics could respond to this issue. It is extremely annoying to lose all your settings.
Thanks in advance.
It's not just the column settings. It appears to be any settings and it doesn't seem to matter which control it is. I have seen this problem appear numerous times over the last year or so. Different computers, different versions of VS, different versions of the controls. It doesn't matter. I have seen numerous reports here but never a proper response.