Hello,
I am using an ultragrid in my application. I am also allowing the end users to change column width, cell font name, font size, horizontal alignment, vertical alignment, column caption etc.
Right now, I am saving all these settings in the format of string for each column (like key-value pairs) but as the number of columns are getting increased, it is becoming quite difficult to implement more and manage.
I am looking at better ways and found that SQL Server has XML datatype and Grid has methods like SaveToXML() and LoadFromXML(). If I use this way, If I use SaveToXML() will it save all the settings (apperance settings) which I discussed above or only a part of it.
Let me know whether this works in my case or not and also I appreciate if there are any better ways.
Thanks
Nagarjun.
Hi,
So you want to combine the properties from multiple columns into one dialog, like the Property Grid in Visual Studio?
I don't think there's any simple way to do that. You would have to examine all of the properties of the object and merge them together somehow. Or you could just use the PropertyGrid control.
I wonder if perhaps the PropertyGrid or the DotNet Framework exposes some way to do this more easily. You might want to investigate how this is achieved in the PropertyGrid and see if you can use the same method. But I don't have any knowledge in that area.
Yes. That's what I am using right now. But it works fine for a single column. I mean I am reading the column properties into options class properties and displaying them and if changes are made, re-assigning all the properties back to column appearance.
But when the user select two columns two or more columns, I need to read appearance of all the columns,compare one with the other and then set my class properties.
I want to know whether there is any better way that this?
You do this the same way you read properties from the grid.
grid.DisplayLayout.Bands[x].Columns[columnKey]
layout..Bands[x].Columns[columnKey]
Can you give me an example how to read a particular column settings from the UltraGridLayout variable.
I have an options form like this
Now when the user clicks on a column and click options I am opening the options form with the selected column properties loaded in.
Can you suggest me a best way to do it?
Nagarjun