Search code examples
c#asp.nettelerikradgrid

Telerik RadGrid GridButtonColumn not visible as Button


The push button is not visible for Reject. Instead it is showing as plain text. Below is the code I have used for it.

<telerik:RadGrid ID="grvUpdate" runat="server" GridLines="Horizontal"
    CellPadding="0" BorderWidth="0px" EnableEmbeddedSkins="False"         
    Width="382px" CellSpacing="0">
    <MasterTableView
        AllowPaging="true"
        PageSize="15"
        CommandItemDisplay="Top"
        AllowFilteringByColumn="false" DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="Id">

        <Columns>
            <telerik:GridBoundColumn DataField="Id" DataType="System.Int64" FilterControlAltText="Filter Id column" HeaderText="Id" ReadOnly="True" SortExpression="Id" UniqueName="Id">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" UniqueName="Name">
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Amount" HeaderText="Amount" SortExpression="Amount" UniqueName="Amount">
            </telerik:GridBoundColumn>                   
            <telerik:GridButtonColumn ButtonType="PushButton" HeaderText="Reject" Text="Reject" UniqueName="Reject" CommandName="Reject"></telerik:GridButtonColumn> 
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Could you please let me know what changes need to be done for the above code to make push button visible properly.


Solution

  • The below code works for me

    <telerik:GridTemplateColumn FilterControlAltText="Filter Reject column" UniqueName="Reject" HeaderText="Reject" Display="true">
                        <ItemTemplate>
                            <telerik:RadButton ID="Button1" runat="server" ButtonType="StandardButton" Text="Reject" CommandName="Reject" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>