How can I trigger RadGrid_CellClick event from code?

2 posts, 0 answers
  1. Juan
    Juan avatar
    1 posts
    Member since:
    Feb 2016

    Posted 06 Mar Link to this post

    Hello

    How can I trigger RadGrid_CellClick event from code?

    Example: 

    private void button1_Click(object sender, EventArgs e)
    {
            RadGrid1_CellClick(new object, new GridViewCellEventArgs());
    }  

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 07 Mar Link to this post

    Hello Juan,

    Thank you for writing.

    You can inherit radGridView and create a method that triggers the event:
    class MyRadGridView : RadGridView
    {
        public void MyClickMethod()
        {
            base.OnCellClick(this, new GridViewCellEventArgs(this.Rows[0], this.Columns[0], this.ActiveEditor));
        }
         
    }

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top