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
150
Column Collection resets randomly during DesignTime with UltraWinGrid Version 7.3.20073.38
posted

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 designer
then 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 source
2.) 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 editor
4.) 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.

Parents Reply Children
No Data