I have the following code that always seems to return null. What am I doing wrong here? I am trying to attach a ContextMenu to the Record. Unless someone has an idea how I can show a ContextMenu that queues off of the selected Record. ie. Delete this selected row.
{
DataRecordPresenter drp = DataRecordPresenter.FromRecord(e.Record) as DataRecordPresenter;
}
Thanks,
Rod
void theDataGrid_InitializeRecord(object sender, InitializeRecordEventArgs e)
if (e.Record != null) this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new RecordMethod(this.GetRecordPresenterForRecord), e.Record);
if (e.Record != null)
this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new RecordMethod(this.GetRecordPresenterForRecord), e.Record);
delegate void RecordMethod(Record rcd);
private void GetRecordPresenterForRecord(Record rcd)
DataRecordPresenter drp = DataRecordPresenter.FromRecord(rcd) as DataRecordPresenter;
"rodyager" wrote in message news:23817@forums.infragistics.com... I have the following code that always seems to return null. What am I doing wrong here? I am trying to attach a ContextMenu to the Record. Unless someone has an idea how I can show a ContextMenu that queues off of the selected Record. ie. Delete this selected row.void theDataGrid_InitializeRecord(object sender, InitializeRecordEventArgs e) {if (e.Record != null) { DataRecordPresenter drp = DataRecordPresenter.FromRecord(e.Record) as DataRecordPresenter; } } Thanks, Rod http://forums.infragistics.com/forums/p/5266/23817.aspx#23817