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

How to set Alt Tag to GridEditCommandColumn Images

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raa
Top achievements
Rank 1
Raa asked on 23 Sep 2008, 06:03 PM

Hi, I'm using a radgrid with a GridEditCommandColumn, I would like to know how can i set the alt tag to the images within the column, Edit Icon, Update Icon, Inser Icon ...

<telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="../images/document_edit.png" HeaderText="Command"  
CancelImageUrl="../images/stop.png" UpdateImageUrl="../images/disk_blue.png" 
InsertImageUrl="../images/disk_blue.png" EditText="Edit Vehicle" CancelText="Cancel" UpdateText="Update Vehicle" InsertText="Save Vehicle" >
</telerik:GridEditCommandColumn> 

I'm also using a GridTemplateColumn, but alt tag is not working.

 <telerik:GridTemplateColumn UniqueName="columnDelete">
<ItemTemplate>
<asp:LinkButton ID="lbDeleteV" runat="server" CommandName="Delete" CommandArguments="delete">
<img style="border:0px" alt="Delete Vehicle" src="images/delete.png" /></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>  
</EditItemTemplate>
</telerik:GridTemplateColumn>  

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Sep 2008, 07:52 AM
Hi,

The alt property is generally supported by images whereas for ImageButtons the property is named as AlternateText property. For the EditCommandColumn EditText, UpdateText, InsertText can be used for the same.

Try setting the alt tag for the linkbutton as shown below.
aspx:
<asp:LinkButton ID="lbDeleteV" runat="server" CommandName="Delete"  CommandArgument="delete"  Text='<img style="border:0px" src="images/delete.gif" alt="Delete Vehicle">'   > 
 </asp:LinkButton> 

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