Hi
I am using Ultrawingrid.Displaylayout.SavaAsXML method to save the layout of the Grid.
there is a node called "UltraGridCilumn" in the XML file. This node is missing is the XML for some grids.
when i Call DisplayLayout.LoadFromXML method column changes like width,Position are not retained.
It is working fine for other grids which has this node information in the XML.
<a1:UltraGridColumn id="ref-38" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/Infragistics.Win.UltraWinGrid/Infragistics2.Win.UltraWinGrid.v8.1">
<CharacterCasing>1</CharacterCasing>
<CellAppearanceHolder href="#ref-60" />
<Header href="#ref-61" />
<Key id="ref-62">DistId</Key>
<Width>561</Width>
<IsBound>true</IsBound>
</a1:UltraGridColumn>
Thanks
Ashok
Sorry . I found the problem. Datasource is nothing at the time of calling SavaAsXML method.
I just want to save the Layout before Datasource becomes nothing.
How to check if datasource of the grid is going to be nothing.
Is there any event like BeforeColPosChanged to handle the datasource Change?
I want to save the layout just before the Datasource is changed.
There is no event that tells you when the data source is changing. If it's changing (i.e. something different is being set to the DataSource property), then it must be something that you are doing, so your best approach woudl be to refactor that logic into a central place, if possible, so you can easily check when it is happening. The only event that fires directly related to the binding of the grid is the InitializeLayout event, but this fires after the property is set.
-Matt