Remove events for Custom Editor RadGridView

1 posts, 0 answers
  1. Pavel
    Pavel avatar
    3 posts
    Member since:
    Aug 2012

    Posted 04 Sep 2012 Link to this post

    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?  

Back to Top