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

Hide button in edit form

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 19 Nov 2012, 07:07 AM
Hi,
     How can I hide the cancel button in edit form from code behind. thanks in advance
Allen

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Nov 2012, 07:12 AM
Hi,

Please try the following code snippet to hide the cancel button from edit form.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    
        GridEditableItem editItem = (GridEditableItem)e.Item;
        LinkButton CancelButton = (LinkButton)editItem.FindControl("CancelButton");
        CancelButton.Visible = false;
    }
}

Thanks,
Shinu.
Tags
Grid
Asked by
Allen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or