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

Grid Command Menu not showing

3 Answers 21 Views
Grid
This is a migrated thread and some comments may be shown as answers.
david
Top achievements
Rank 1
david asked on 21 Oct 2019, 03:49 PM

     I have built dozens of grids with command menus with no issues, but this one does not show?

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
    Width="1200px" CommandItemDisplay="Top"
    RenderMode="Auto" AllowPaging="True" AllowSorting="True" PageSize="50" ShowHeader="true">
    <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
    <ExportSettings FileName="Agenda">
    </ExportSettings>
    <ClientSettings EnableRowHoverStyle="True">
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
    <MasterTableView DataKeyNames="ID" CommandItemDisplay="Top" PageSize="25">
        <CommandItemSettings ShowAddNewRecordButton="False" ShowPrintButton="true" ShowExportToExcelButton="True" ShowExportToCsvButton="true" ShowRefreshButton="False" />
        <RowIndicatorColumn Visible="False">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Created="True">
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridTemplateColumn HeaderText="Client" SortExpression="Client" UniqueName="flname">
                <ItemTemplate>
                    <asp:HyperLink ID="editClient" runat="server" NavigateUrl="#" Text='<%# Eval("flname") %>'></asp:HyperLink>
                </ItemTemplate>
                <ItemStyle Width="125px" Font-Size="8" />
            </telerik:GridTemplateColumn>

            <telerik:GridBoundColumn DataField="APTCPTCode" HeaderText="CPT Code" UniqueName="APTCPTCode" Display="True">
                <ItemStyle Width="50px" Font-Size="8" />
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="Start" DataType="System.DateTime" Display="True" FilterControlAltText="Filter Start column" HeaderText="Date" SortExpression="Start" UniqueName="Start" DataFormatString="{0:g}">
                <ItemStyle Width="125px" HorizontalAlign="Center" Font-Size="8" />
                <HeaderStyle HorizontalAlign="Center" />
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status" Display="True">
                <ItemStyle Width="50px" Font-Size="8" />
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="Duration" DataType="System.Int32" HeaderText="Min" ReadOnly="True" SortExpression="Duration" UniqueName="Duration" HeaderStyle-HorizontalAlign="Center" Visible="True">
                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                <ItemStyle Width="40px" HorizontalAlign="Center" Font-Size="8" />
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="ClientID" FilterControlAltText="Filter ClientID column" HeaderText="ClientID" SortExpression="ClientID" UniqueName="ClientID" Display="false">
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="Subject" FilterControlAltText="Filter Subject column" HeaderText="Subject" SortExpression="Subject" UniqueName="Subject" Visible="True">
                <ItemStyle Width="80px" Font-Size="8" />
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="Practitioner" HeaderText="Staff" SortExpression="Practitioner" UniqueName="Practitioner" Display="True">
                <ItemStyle Width="100px" Font-Size="8" />
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="RoomName" FilterControlAltText="Filter RoomName column" HeaderText="Room" SortExpression="RoomName" UniqueName="RoomName" Visible="true">
                <ItemStyle Width="80px" Font-Size="8" />
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="Owner" HeaderText="Owner" DataType="System.Boolean"></telerik:GridCheckBoxColumn>

            <telerik:GridCheckBoxColumn DataField="HasInsurance" HeaderText="Insurance" DataType="System.Boolean"></telerik:GridCheckBoxColumn>

            <telerik:GridBoundColumn DataField="UserID" DataType="System.Int32" Visible="False" FilterControlAltText="Filter UserID column" HeaderText="UserID" SortExpression="UserID" UniqueName="UserID">
            </telerik:GridBoundColumn>
        </Columns>
        <CommandItemTemplate>
        </CommandItemTemplate>
    </MasterTableView>

    <FilterMenu RenderMode="Auto"></FilterMenu>

    <HeaderContextMenu RenderMode="Auto"></HeaderContextMenu>
</telerik:RadGrid>

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 24 Oct 2019, 11:44 AM

Hi David,

The command row is not visible due to the defined empty CommandItemTemplate in the end of the Grid declaration. Removing the highlighted lines below will allow you to see and use the desired built-in buttons:

            <telerik:RadGrid ...>
                   ...
                    <CommandItemTemplate>
                    </CommandItemTemplate>
                </MasterTableView>
            </telerik:RadGrid>

Regards,
Vessy
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
david
Top achievements
Rank 1
answered on 24 Oct 2019, 06:44 PM
oops, Thanks!
0
Vessy
Telerik team
answered on 25 Oct 2019, 07:33 AM

You are welcome, David :)

Regards,
Vessy
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
david
Top achievements
Rank 1
Answers by
Vessy
Telerik team
david
Top achievements
Rank 1
Share this question
or