I've got the grid edit hyperlink working but I would rather use the default edit icon. Any ideas how to do this? Here is my code:
The above works perfectly but I would really like to use the default edit icon instead of a hyperlink. Please help. Thanks
Troy
<telerik:GridTemplateColumn UniqueName="TemplateEditColumn"> <FilterTemplate> </FilterTemplate> <ItemTemplate> <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink> </ItemTemplate> </telerik:GridTemplateColumn>
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem item = (GridDataItem)e.Item; HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink"); editLink.Attributes["href"] = "#"; editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", item.GetDataKeyValue("CatalogueItemId"), item.ItemIndex); } } The above works perfectly but I would really like to use the default edit icon instead of a hyperlink. Please help. Thanks
Troy