Hi there,
I activiate and select a record in XamDataGrids InitializeRecord event. After the Grid is shown the Record is selected too. But not in Viewport. How can I realize that. Please have a look at the Sample I've attached.
-JD-
Yes, instead of setting the RecordContainerGenerationMode to Preload which will pre-hydrate all of the elements in the visual tree for all of the records you could do one of the following:
Hi Joe,
it works fine. Thank you! But it is important to set the RecordContainerGenerationMode="PreLoad". All other Mode's don't work! Or is there any other way?
Hi JD,
It appears to be a timing issue. You need to do this asynchronously, e.g.
delegate void RecordMethod(Record rcd);
{
rcd.DataPresenter.BringRecordIntoView(rcd);
}
string modelID = ((DataModel)this.DataContext).ID;
// Record found - activate and select them
this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new RecordMethod(this.ActivateRecord), item);