i've created following context menu + menu item.
RadContextMenu contexMenu = new RadContextMenu();
RadMenuItem deleteMenuItem = new RadMenuItem();
RadMenuItem exportMenuItem = new RadMenuItem();
RadMenuItem exportCsvMenuItem = new RadMenuItem();
RadMenuItem addToReports = new RadMenuItem() { Header = TranslateComboBoxDB.Translate(VIConstantsStrings.AddToReportTxt).ToString() };
addToReports.Click += addToReports_Click;
After all processing and all(applying header's n click function)
contexMenu.Items.Add(addToReports);
treeViewitem.ContextMenu = contexMenu; //getting error
e.Handled = true;
for above, treeViewitem is "var treeViewitem = sender as RadTreeViewItem;"
Error i'm getting is:
Cannot convert source type from RadContextMenu to System.....ContextMenu.
so, treeViewitem is a telerik component, and its using a framework element, so how can i add that into the sender object.