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

PushButton with image in Radgrid

2 Answers 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ruchi
Top achievements
Rank 1
Ruchi asked on 23 Feb 2015, 02:47 PM
Hello Team,

I am using Radgrid, I want All buttons inside grid as pushbutton with image inside it.


<telerik:GridTemplateColumn AllowFiltering="false">
                                                                   <ItemTemplate>
                                                                       <asp:ImageButton CommandName="Edit" runat="server" Text="Edit" ImageUrl="~/Images/Edit.png"></asp:ImageButton>
                                                                       <asp:LinkButton CommandName="Edit" runat="server" Text="Edit"></asp:LinkButton>
                                                                   </ItemTemplate>
                                                               </telerik:GridTemplateColumn>

I have placed template column for Edit button as above. but i need pushbutton with all skin changes and an image inside button at left side and text as right side.

Can any one help me out?

Thanks and Regards,
Ruchi Patel

2 Answers, 1 is accepted

Sort by
0
Jaya
Top achievements
Rank 1
answered on 24 Feb 2015, 04:23 AM
Hi
Ruchi

try this code

<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
        ButtonType="PushButton" ImageUrl="~/RadControls/Grid/Skins/Default/Delete.gif">
      </telerik:GridButtonColumn>
                        
                        <telerik:GridTemplateColumn AllowFiltering="false">
                                                                   <ItemTemplate>
                                                                       <asp:ImageButton ID="ImageButton1" CommandName="Edit" runat="server" Text="Edit" ImageUrl="~/Images/Edit.png"></asp:ImageButton>
                                                                       <asp:LinkButton ID="LinkButton1" CommandName="Edit" runat="server" Text="Edit"></asp:LinkButton>


                                                                       
                                                                   </ItemTemplate>
                                                               </telerik:GridTemplateColumn>
                        
0
Ruchi
Top achievements
Rank 1
answered on 26 Feb 2015, 09:53 AM
Hello
Jaya,

Thanks For your Help. It didn't worked. After Doing some R&D, i came up with a solution which is best for me, Please have a look :

                       <telerik:GridTemplateColumn AllowFiltering="false">
                                                                    <ItemTemplate>
                                                                        <telerik:RadButton ID="btnEditET" runat="server" Text="Edit" CommandName="Edit" EnableBrowserButtonStyle="false">
                                                                            <Icon PrimaryIconCssClass="rbEdit" PrimaryIconLeft="5" PrimaryIconTop="3"></Icon>
                                                                        </telerik:RadButton>
                                                                    </ItemTemplate>
                                                                </telerik:GridTemplateColumn>

By doing this we had a push button with the image that you need.

But now i am stucked at one more Point, In my Grid AllowAutomaticInserts and AllowAutomaticUpdates are set to true, So whenever we Add or Edit a record, Telerik's inBuilt Template for Adding & Updating a record Appears.

In that Section the Button which it is showing is not in the way that i want i.e Push Button with Image.

Can Anyone Help me, customising Inbuilt Template Buttons of telerik AllowAutomaticInserts and AllowAutomaticUpdates functionality??

Regards,
Ruchi Patel
Tags
Grid
Asked by
Ruchi
Top achievements
Rank 1
Answers by
Jaya
Top achievements
Rank 1
Ruchi
Top achievements
Rank 1
Share this question
or