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

How can I trigger RadGrid_CellClick event from code?

1 Answer 137 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 07 Mar 2016, 03:19 AM

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());
}  

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 07 Mar 2016, 10:48 AM
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
Tags
GridView
Asked by
Juan
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or