Radgrid CommandItemSettings add custom button

nav100 picture nav100 · Apr 2, 2012 · Viewed 26k times · Source

I have a Telerik RadGrid has a "Add New" button using a CommandItemSettings-AddNewRecordText. I would like to add a custom button next to "Add New" called "Add Custom". I created CommandItemTemplate to create a custom button. But it replaces the "Add New" button. How can I use "CommandItemSettings" and "CommandItemTemplate" together? I couldn't find any examples online. Please let me know.

 <telerik:RadGrid ID="rgTest" runat="server" AutoGenerateColumns="false" >

    <MasterTableView DataKeyNames="id" PageSize="50"
        CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add New"
        Width="100%"  EditMode="EditForms" Name="Master">

    <CommandItemTemplate>
    <div style="padding: 5px 5px;">
    <asp:LinkButton ID="LinkButton2" runat="server" >Add custom</asp:LinkButton>&nbsp;&nbsp;
    </div>
    </CommandItemTemplate>

Answer

Dhaval Shukla picture Dhaval Shukla · Apr 4, 2012

Could you please check the below link, in it they have specified the add with custom item and also you can put your custom button over there :

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/commanditem/defaultcs.aspx