Grid Command Menu not showing

4 posts, 0 answers
  1. david
    david avatar
    239 posts
    Member since:
    May 2007

    Posted 21 Oct Link to this post

         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>

  2. Vessy
    Admin
    Vessy avatar
    2067 posts

    Posted 24 Oct Link to this post

    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.
  3. david
    david avatar
    239 posts
    Member since:
    May 2007

    Posted 24 Oct in reply to Vessy Link to this post

    oops, Thanks!
  4. Vessy
    Admin
    Vessy avatar
    2067 posts

    Posted 25 Oct Link to this post

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