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

Edit mode images and text

2 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karthikha
Top achievements
Rank 1
Karthikha asked on 06 Apr 2012, 04:05 PM
Hi,

I am using GridEditCommandColumn and the ButtonType is set to ImageButton.

<

telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"  

 

UpdateText="Save" CancelText="Cancel"  

 

EditImageUrl="Images/Edit.gif">

 


In edit mode, I want an image to be displayed on Edit and text for Update and Cancel as in the code above. Is it possible to achieve?
On changing the ButtonType to LinkButton, the edit image is not displayed but replaced with 'Edit' text.

2 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 07 Apr 2012, 06:18 AM
Hello Karthikha,


Please use below code snippet to achieve your requirement.
<telerik:GridTemplateColumn>
                       <ItemTemplate>
                           <asp:ImageButton CommandName="Edit" />
                       </ItemTemplate>
                       <EditItemTemplate>
                           <asp:LinkButton CommandName="Update"></asp:LinkButton>
                           <asp:LinkButton CommandName="Cancel"></asp:LinkButton>
                       </EditItemTemplate>
                   </telerik:GridTemplateColumn>


Thanks,
Jayesh Goyani
0
Karthikha
Top achievements
Rank 1
answered on 07 Apr 2012, 03:47 PM
Thank you Jayesh. It is working as expected :)

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