Hi,
i am using the PersistenceManager to save the grid's layout and load it later.
but it's not saving the conditional formatting.
how can this be done?
any suggestion?
This appears to be a bug. I will have our DS staff write up an issue for you.
Got it
i just add the following code to the style when adding a new condition
int i = Application.Current.Resources.Count+1;
Application.Current.Resources.Add("CondFormatStyle"+i.ToString(), s);
PersistenceManager.SetIdentifier(s, "CondFormatStyle" + i.ToString());
ok.. it 's working when having the style in the application resources.
but i still have 2 problems.
1 - the styles are built at runtime through a user control. so i dont have static resources for the style.
2 - the grid i am building is a user control project so it does not have the app.xaml
any other way?
Ok its not a bug, i just wish I could read
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=Persistence_Identifier.html
The issue is that the StyleToApply can't be saved by the persistence framework, so that is lost. Fortunately there is an easy way to deal with this limitation. Basically you move the style to the App.Xaml and mark it fo for the persistence framework to utilize.
See attached sample
ok.. i thought i should add some more code to save the conditional formatting.