How to understand when grid's customization is loaded?
This method works asynchronously and doesn't return a value, this is also no LayoutLoaded event.
xamDataGrid.LoadCustomizations(...);
a bug?
Hi,
Feature Request has been submitted.
I did notice that the FieldLayouts PropertyChange event does fires after a LoadCustomization method is called. You could wire this event up and bypass the logic init using a global variable that you set during a LoadCustomization process. You could key off of a certain property change to load your summary records.
here a code snippet
load = false;
// xamDataGrid1.FieldLayoutInitializing += new EventHandler<Infragistics.Windows.DataPresenter.Events.FieldLayoutInitializingEventArgs>(xamDataGrid1_FieldLayoutInitializing);
xamDataGrid1.FieldLayouts[0].PropertyChanged += new PropertyChangedEventHandler(MainWindow_PropertyChanged);
}
void MainWindow_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
//throw new NotImplementedException();
if (load)
Dispatcher.BeginInvoke(ew Action (() =>
MessageBox.Show(e.PropertyName);
}), null );Sincerely, Matt Developer Support Engineer
Yes, I need that event when layout is loaded added to xamDataGrid.
Othervise I don't know when to add SummaryDefenitions to my grid. I must do if after grid's layout is loaded. And I don't want to save SummaryDefinitions to the layout cos it would be too unflexible.
Why did you implement it to be async? Surely there must be a callback method..
HI ,
Just following up on this forum thread.
If you need further assistance, plesae let me know.
Sincerely. Matt Developer Support Engineer
Hi Andy,
I submitted a feature request for an event to fire after LoadCustomization has completed.
Can you attach your layout? - I'd like to see the customizations that are causing the Summaries to fail.
Sincerely, Matt Developer Support Engineer
Hi Matt, of course I need more assitance here.
I need an event when async loading of grid's layout is complete.
When I load my grid I always restore its layout first. And then I need to add some custom logic, let say I want to add row summaries to the grid. But loading the layout whipes out my summaries.
Here is some psydo code:
xamDataGrid1.LoadCustomizations(layout);
xamDataGrid1.Records.Summaries.Add(....);
.....
few seconds later when lyout is loaded, the summaries are all empty becase there are not in the layout.
THanks.