I may have missed something, but I am unable to see how I can save various settings which I would like users to be able to select.
A simple example might be the background colour associated with a certain status, for cells in a report grid or ultragrid, .
e.g. Infragistics.Documents.Graphics.Brushes:WhiteSmoke.
In Visual Studio one can use the application settings to save settings of any type. Is there a simple way to do this is Progress?
I believe you will have to write that piece in GUI for .NET.
I can't really see how to do this. How would you save a class or property to a file or the database.?
A class, no, but a property is just a value like any other value, i.e., like a database field. You can save them as fixed fields, name/value pairs, or write out some XML.
I am still unable to see how to resolve the problem.
In the example below. What I wish to do is initialise the cellBackground from a stored value.
Background is a property of the cellPattern, but is an instance of a background object. (is that right?)
DEFINE VARIABLE cellBackGround AS Infragistics.Documents.Report.Background NO-UNDO.
cellBackGround =
cellBackGround = NEW Background(Infragistics.Documents.Graphics.Brushes:White).
cellPattern:
cellPatten:BACKGROUND = cellBackGround.
I haven't tried this in Progress GUI for .NET, but this is how I load Enum values from a String in Visual Studio (code is converted to ABL language).
DEFINE VARIABLE cellBackGround AS Infragistics.Documents.Report.Background NO-UNDO.
cellBackGround = CAST(System.Enum.Parse(Progress.Util.TypeHelper:GetType("Infragistics.Documents.Report.Background"), "WhiteSmoke"), Infragistics.Documents.Report.Background).
"WhiteSmoke" is your stored setting.
Hi,
you may use the standard Infragistics toolbox to save the user layout. All main objects are serializable, so they can be saved in XML format, look this example to save:
this-object:UltraGrid1:DisplayLayout:SaveAsXml(
"C:\\Users\\eric\\Documents\\savedLayout.xml",
Infragistics.Win.UltraWinGrid.PropertyCategories:All).
And to load :
this-object:UltraGrid1:DisplayLayout:LoadFromXml(
"C:\\Users\\eric\\Documents\\savedLayout.xml",
Infragistics.Win.UltraWinGrid.PropertyCategories:All).
Me I'm saving the XML file and then I store it in my database for each user, I use those file *as temporary files*.
Hope it's help!
Best regards,
Eric
Hi
Would it be possible to send me the code you are using to save xml in your database please.
Regards
Peter
Have a look at the COPY-LOB statement.