CellClick not firing for custom cell element

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

    Posted 14 Jul Link to this post

    I've got a custom cellelement and column that contains a RadWebBrowserElement. Clicking inside the document does not trigger the cellclick(other regular columns work fine). I've tracked down the event I need and added an onclick listener to it with: _webBrowserElement.WebBrowserItem.WebBrowserControl.Document.Click += Document_Click;

    Clicking inside the document fires Document_Click but I'm assuming I have to somehow have Document_Click fire the cellclick event but am unclear how to do this.

    Any help would be much appreciated,


  2. Hristo Merdjanov
    Hristo Merdjanov avatar
    667 posts

    Posted 15 Jul Link to this post

    Hello Brandon,

    Thank you for writing.

    You can convey the Click event of the Document by using the EventDispatcher class and raise the CellClick event in the grid: 
    private void Document_Click(object sender, HtmlElementEventArgs e)
               this.MasterTemplate.EventDispatcher.RaiseEvent<GridViewCellEventArgs>(EventDispatcher.CellClick, this,
                        new GridViewCellEventArgs(this.RowInfo, this.ColumnInfo, this.GridViewElement.ActiveEditor));

    I am also sending you attached a sample project demonstrating the suggested approach.

    I hope this helps. Please let me know if you need further assistance.

    Hristo Merdjanov
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms. For more information check out this blog post and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top