My users want to change column order, column width, etc. in an UltraWinGrid based on a selection from a combobox and to automatically restore those changes whenever the click on that selection. I've been reading up on savelayout/loadlayout but is there a way to save the layout in a SQL Server table?
JamesJay
Hi James,
JamesJay said:The only thing I find in help for PropertyCategories is that it's an enum. I don't understand why you would have a choice of property categories if you don't know what each one does or is for. How can I use them if I don't know what they do?
They are documented here:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v8.2~Infragistics.Win.UltraWinGrid.PropertyCategories.html
JamesJay said: I tried using PropertyCategorie.All but I lost my Summary row when the DisplayLayout was loaded. There has only been one other developer on this project and he didn't do anything with DisplayLayout that should affect the summary row when the DisplayLayout is loaded. I have not done any manipulating of DisplayLayout either.
If you specified All, then everything should be saved, including the summaries. Assuming you specified All when you both saved and loaded the layout, then I can't explain why the summary row is lost. It should not be. Either something in your code is removing it somehow or there's a bug there.
Perhaps you should Submit an incident to Infragistics Developer Support and include a small sample project demonstrating the behavior you are getting so they can take a look.
Ok, now I'm really getting confused.
The only thing I find in help for PropertyCategories is that it's an enum. I don't understand why you would have a choice of property categories if you don't know what each one does or is for. How can I use them if I don't know what they do?
I tried using PropertyCategorie.All but I lost my Summary row when the DisplayLayout was loaded. There has only been one other developer on this project and he didn't do anything with DisplayLayout that should affect the summary row when the DisplayLayout is loaded. I have not done any manipulating of DisplayLayout either.
I have also gotten some strange behavior from loading PropertyCategories like columns previously set to NoEdit getting changed to AllowEdit and columns hidden property being changed from True to False.
All I am trying to do, all I need to do is save the grid's column widths and column order for a user and restore them when the user opens trhe application. I wanted the definitions for the PropertyCategories to see if I could limit changes to just col width and order and, hopfully, not lose the summary row when the categories are loaded.
Well, other than the help, I don't know of any other documentation on what the categories include. Why specify categories at all? Why not just save everything? Is there something specific that you want to exclude from the saved layout?
There are any number of ways that you could reset or change a property setting. Loading the layout just sets certain properties, so anything in your code could change those settings after the layout is loaded. You could check for the word "Reset" in your code, I guess.
Where can I get more information on what the different PropertyCategories do? I'm having a lot of trouble now with the format changing in the columns like losing currency and noedit properties. When I disable the object that loads the saved properties the defaults are restored.
I know the previous programmer wasn't aware of PropertyCategories because he saved the individual column widths in a table and loaded them back in a column at a time. An unwieldy process which I tried to improve using PropertyCategories. In hindsight maybe not the right thing to do.
Is there anything other than directly setting categories in the code that could accidentally set/reset them?
Hi,
No, I can't see why that would be. Maybe something in your code is removing the summary after you load the layout. Or perhaps the PropertyCategories you are specifying does not include summaries?