I have a gridview and Ioding it with RadDomainDataSource.
In this I need to attach 2 RadContextMenu's based on the record statsus (success/Failure).
I am doing this in the RowLoaded event of the Gridview.
Following is the code:
if(e.Row.Item != null)
{
if (((TransactionsDTO)e.Row.Item).PostingResult == "Success")
{
RadContextMenu.SetContextMenu(e.Row, RadGridViewSuccessContextMenu);
}
else
{
RadContextMenu.SetContextMenu(e.Row, RadGridViewFailedContextMenu);
e.Row.Background = new SolidColorBrush(Colors.Red);
}
}
It is properly attaching the ContextMenu in the first page. I am facing the following problem when I move to the next page.
at Telerik.Windows.Controls.RadContextMenu.ClearReferences()
at Telerik.Windows.Controls.RadContextMenu.OnContextMenuChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Telerik.Windows.Controls.RadContextMenu.SetContextMenu(FrameworkElement element, RadContextMenu value)
at MyApp.Views.Transactions.customerGridView_RowLoaded(Object sender, RowLoadedEventArgs e)
This code properly worked with the previous version of Telerik (2010.3.1326.1040).
I think this was introduced in the latest version (2011.1.427.1040).
Please help.
Regards,
SivaPrasad.B