This is a migrated thread and some comments may be shown as answers.

Remove events for Custom Editor RadGridView

0 Answers 7 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 05 Sep 2012, 02:52 AM

I create a different Cell editor by http://www.telerik.com/help/wpf/radgridview-howto-create-custom-editor.html  example.

public class MyColumn : GridViewBoundColumnBase
{

public event EventHandler OnClick;

public override FrameworkElement CreateCellElement( GridViewCell cell, object dataItem )
   {

     var editor = new MyButton();

     editor.ButtonClicked += new EventHandler<RoutedEventArgs>(_editor_ButtonClicked);

     return 
   }

void _editor_ButtonClicked(object sender, RoutedEventArgs e)
{
if (OnClick != null)
  OnClick(this,...);
}

}

How can I dispose  ButtonClicked and  OnClick handler?  

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Pavel
Top achievements
Rank 1
Share this question
or