Hi,
Previously with syncfusion version 5.1.1.47, I used SaveBarState() and LoadBarState() methods to save into database and load from the database the toolbar states.
Here is the code snippet I have used:
private void SaveToolbarState()
{
MemoryStream memoryStream = new MemoryStream();
// save the customized data into the stream
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memoryStream);
mainFrameBarManager.SaveBarCustomization(serializer);
mainFrameBarManager.SaveBarState(serializer); // here I am getting Object refference not set to an instance exception.
serializer.PersistNow();
}
private void LoadToolbarState()
{
// get the byte array from backend
MemoryStream memoryStream = new MemoryStream(buff, 0, buff.Length);
memoryStream.Seek(0, SeekOrigin.Begin);
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memoryStream);
mainFrameBarManager.LoadBarCustomization(serializer);
mainFrameBarManager.LoadBarState(serializer);
}
Now I upgraded into syncfusion version 6.4.0.15. After upgrading, the following problems has raised.
1) In SaveToolbarState() method, at this line mainFrameBarManager.SaveBarState(serializer) I am getting "Object refference not set to an instance" exception.
Why this exception has raised?
2) If I use another approach to save toolbar states into XML file and load from XML file, as attached file
(or)
to save toolbar states into windows regestry load from windows registry, as attached file.
If I run my application more than 6 or more times it is taking long time to load toolbar states.
Why it is taking long time to load toolbar states?
How can I reduce the time to load toolbar states?
Please run attached samples, you will understood clearly.
Repeat it more than 10 times, each time your will find it will increate the time to load toolbar states.
Thanks & Regards
-Kishan
ToolBarStates_cdd03c12.zip