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

GradGrid Header with CommandButton or the same Style

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniela
Top achievements
Rank 1
Daniela asked on 05 Jan 2011, 01:36 PM
we want in our "RadGrid" use the "CommandItemTemplate. there are all the action button (insert, delete, update, refresh) are involved. we want the icon there, same as in the commant button ->

<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />

Can we embed the "CommandButton"in a CommandItemTemplate or include in the Grid-Header (CommandItemDisplay = "top")? If so, how?

If this is not possible then we can take advantage of the style or the icon?

   <CommandItemTemplate>
     <div style="padding: 5px 5px;">
       <asp: LinkButton ID = "ButtonEditSelected" runat = "server" CommandName = "EditSelected" Visible ='<%# RadGridProgramCategory.EditIndexes.Count == 0%> '>
         <img style = "border: 0px; vertical-align: middle;" alt = "" src ="???????" />
       </ asp: button>
     </ div>
   </ CommandItemTemplate>

Regards

Dani

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Jan 2011, 09:03 AM
Hello

Try the following mark up to show the icon for AddNewRecord button..

<CommandItemTemplate>
                    <img src='<%= ClientScript.GetWebResourceUrl(grdEmail.GetType(), "Telerik.Web.UI.Skins.Telerik.Grid.AddRecord.gif") %>'
                        alt="AddNewRecord" />
</CommandItemTemplate>

Thanks,
Shinu.
Tags
Grid
Asked by
Daniela
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or