How to set button width into telerik:GridTemplateColumn

2 posts, 0 answers
  1. Mina
    Mina avatar
    6 posts
    Member since:
    Mar 2012

    Posted 24 Apr 2013 Link to this post


    How to set width of the buttons inside the telerik:GridTemplateColumn column. I add 2 buttons to my grid

    <telerik:GridTemplateColumn UniqueName="Export2">
            <telerik:RadButton ID="btnExport2" runat="server" Text="Button2" CommandName="Export2" Width="100px" />
        <ItemStyle HorizontalAlign="Center"/>
    <telerik:GridTemplateColumn UniqueName="Export1">
            <telerik:RadButton ID="btnExport1" runat="server" Text="Button1" CommandName="Export1" Width="100px" />
        <ItemStyle HorizontalAlign="Center" />

    How to set buttons' width to fill all column's width? At that moment they does not fill all column's with. Take a alook at attached file.

    Thank you.

  2. MasterChiefMasterChef
    MasterChiefMasterChef avatar
    152 posts
    Member since:
    Jan 2013

    Posted 24 Apr 2013 Link to this post

    Hi Mina,

    If the RadGrid columns are static, then you should be able to just set the 'width' property of each button (currently you have both set to 100px). If the RadGrid is dynamic, you may want to set these columns to have a static width. You can do this by using the resizeColumn property (bottom of page here). Then you can just set both the column and button to have the same width. 

    Hopefully this helps,
    Master Chief
  3. DevCraft R3 2016 release webinar banner
Back to Top