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

Hide Cancel Command from GridEditCommandColumn

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aditi
Top achievements
Rank 1
Aditi asked on 13 Oct 2012, 12:23 AM
Hi,

I have radgrid with GridEditCommandColumn.
I always keep grid items in edit mode.
In edit mode I also want to hide the Cancel image.

Please suggest.

Thanks,
Aditi

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 14 Oct 2012, 09:07 AM
Hello,

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
       if (e.Item.IsInEditMode)
       {
           if (e.Item is GridDataInsertItem)
           {
               LinkButton.CancelButton = (LinkButton)editItem.FindControl("CancelButton");
               CancelButton.Visible = false;
           }
           else
           {
               LinkButton CancelUpdateButton = (LinkButton)editItem.FindControl("CancelButton");
               CancelUpdateButton.Visible = false;
           }
       }
 
   }


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Aditi
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or