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

Hide the Cancel in Edit Mode

2 Answers 22 Views
Grid
This is a migrated thread and some comments may be shown as answers.
aj
Top achievements
Rank 1
aj asked on 04 Nov 2011, 08:42 PM

Hello everyone, need help if possible...
I'm currently trying to hide the "Cancel" on my edit form and leave the Update visible

Here's how my editforms looks like

 

<

 

EditFormSettings>

 

 

<EditColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" UpdateImageUrl="Images/update2.png" CancelImageUrl="Images/cancel.png" Visible="True">

 

 

</EditColumn>

 

</

 

EditFormSettings>

 

 

 

If I change the Visible to = false it hides both.

Any help is greatly appreciated, I'm currently new to Telerik

Thanks!

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Nov 2011, 05:15 AM
Hello,

void RadTreeList1_ItemDataBound(object sender, TreeListItemDataBoundEventArgs e)
{
if (e.Item.IsInEditMode)
        {
            if (e.Item is GridDataInsertItem)
            {
                GridEditableItem editItem = (GridEditableItem)e.Item;
                ImageButton InsertButton = (ImageButton)editItem.FindControl("PerformInsertButton");
                ImageButton CancelButton = (ImageButton)editItem.FindControl("CancelButton");
               CancelButton.Visible = false;
              
            }
            else
            {
                GridEditableItem editItem = (GridEditableItem)e.Item;
                ImageButton updateButton = (ImageButton)editItem.FindControl("UpdateButton"); 
       ImageButton CancelUpdateButton = (ImageButton)editItem.FindControl("CancelButton");    
        CancelUpdateButton.Visible = false;
              
            }
        }
}


Thanks,
Jayesh Goyani
0
aj
Top achievements
Rank 1
answered on 11 Jul 2012, 02:01 PM
I really appreciate it.

Sorry for the late reply I had to move to a different project but this came up again :)

THANKS AGAIN!
Tags
Grid
Asked by
aj
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
aj
Top achievements
Rank 1
Share this question
or