Hi
The LoadCustomization not working if i call immediately after assigned the datasource.
After that if i called through any button action, the preference loads perfectly.
Please see the attached solution.
Steps to Reproduce:(Run the solution)(Library version 9.2.20092.2001)
1. Click the LoadGrid.
2. Sort the Salary column.
3. Click SaveCustomization button. (The preference will store in local member)
4. Again click the LoadGrid. Now the new grid will create with same fields and datasource.
And i load the stored preference there. (see my code)
5. But If you click the LoadCustomization button in screen, the stored preference will load
perfectly.
What i have to do extra on this to LoadCustomization immediately.?
Regard
Ramesh.P
Hi,
It seems to be the current thread of UI having some problem loading the customization as soon as you bind the data source and load the customization. I have tried to fix this by moving my code into the dispatcher and it is now working fine.
System.Windows.
Application.Current.Dispatcher.BeginInvoke((DispatcherDelegate)delegate() {
xamGrid.DataSource = data;
xamGrid.LoadCustomizations(customizations);
}, System.Windows.Threading.
DispatcherPriority.DataBind);
I am using the version="9.2.20092.2001" formatVersion="1.4"
Regards,
Aqeel.
Thanks Alex.
You are right. In new version 9.2.20092.2023 It is working well.
Hello Ramesh,
I tested your sample and I think it runs correctly. I am using 9.2.20092.2023 so this is probably something that we have already resolved.
Here is what I am doing:
1. Click Load
2. Move some fields or sort
3. Click Save
4 Move some fields or sort again
5. Click Load Grid or Load Customizations. The settings saved in 3 are restored.