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
739
Applying Presets Problem
posted

Hello

We are developing winform application using infragistics component vol 3.

I have used this method ultraGrid1.DisplayLayout.SaveAsXml (test.xml) to store the properties of ultrawingrid.

When i apply the file in preset like 

 Dim Presetpath As String = "C:\VisualAnalysisSuite\VisualAnalysisSuite\bin\test.xml" 

 Me.ultraGrid1.ApplyPresetFromXml(Presetpath) this .It show error like {"Object reference not set to an instance of an object."}.

How to solve that?

 Actually we  need to store the properties of ultrawingrid in xml file at runtime.And then we have to  load it via applypresetfromxml method to grid.

Pls give suggestion or coding.  how to do it?
 

  • 469350
    Verified Answer
    Offline posted

     Hi,

        You are mixing up two different concepts here. A Layout is not a Preset and a Preset is not a layout. If you save the DisplayLayout, then you can only load that back into the DisplayLayout. If you want to apply a Preset, then you have to save a Preset, not a layout.

        The DisplayLayout contains information specific to the data structure, like the columns and bands. It's used to save things like the hidden state, position, and size of the columns, as well as filtering and sorting. Basically, things that the user can change. 

        A Preset is mostly used for things that the user cannot change, like colors and behavior and it is completely independent of the data structure.