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

How do you hide the cancel icon

2 Answers 23 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter Sitero
Top achievements
Rank 1
Peter Sitero asked on 12 Nov 2009, 05:09 PM
How do you hide the red x cancel image from an InPlace RadGrid form?

2 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 12 Nov 2009, 08:29 PM
This piece of code should  take care of it:
     
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    if (e.Item is GridEditFormItem && e.Item.IsInEditMode) 
    { 
        GridEditFormItem editForm = (GridEditFormItem)e.Item; 
        LinkButton cancelButton = (LinkButton)editForm.FindControl("CancelButton"); 
        cancelButton.Visible = false
    } 

0
Princy
Top achievements
Rank 1
answered on 13 Nov 2009, 07:25 AM
Hello Peter,

Since you are using Inplace edit mode and also ImageButtons, you can use the following code:
c#:
 protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            GridEditableItem editForm = (GridEditableItem)e.Item; 
            ImageButton cancelButton = (ImageButton)editForm.FindControl("CancelButton"); 
            cancelButton.Visible = false
        }      
    } 

Thanks
Princy.
Tags
Grid
Asked by
Peter Sitero
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Princy
Top achievements
Rank 1
Share this question
or