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

Trigger Edit Mode from an external button

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 03 Apr 2010, 05:20 PM
How can I throw the radgrid into edit mode from a button outside of the control?

...and then hide the button while it's in edit mode...?

Thanks,
Steve

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Apr 2010, 05:36 AM

Hi Steve,

The following code snippet will help you in putting grid row in EditMode and to hide the corresponding autogenerated Edit button when in EditMode.

C#:

 
    protected void Button1_Click(object sender, EventArgs e)  
    {  
        RadGrid1.MasterTableView.Items[2].Edit = true;  
        RadGrid1.MasterTableView.Rebind();  
        (RadGrid1.MasterTableView.Items[2].FindControl("AutoGeneratedEditButton"as LinkButton).Visible = false;  
    } 

-Shinu.

Tags
Grid
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Shinu
Top achievements
Rank 2
Share this question
or