PushButton with image in Radgrid

3 posts, 0 answers
  1. Ruchi
    Ruchi avatar
    54 posts
    Member since:
    Apr 2012

    Posted 23 Feb 2015 Link to this post

    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. Jaya
    Jaya avatar
    81 posts
    Member since:
    Mar 2011

    Posted 23 Feb 2015 in reply to Ruchi Link to this post

    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>
                            
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ruchi
    Ruchi avatar
    54 posts
    Member since:
    Apr 2012

    Posted 26 Feb 2015 Link to this post

    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
Back to Top