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

How to show CommandItemTemplate in "Top" only?

1 Answer 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Venkata
Top achievements
Rank 1
Venkata asked on 07 Dec 2013, 10:07 AM
Hello,

I want to show the CommandItemTemplate in "Top" only. I am using the default commanditemtemplate of RadGrid. I have set CommandItemDisplay = "Top", then also the commanditemtemplate toolbar is showing in top and bottom.

Please look on to the following code:

<telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" AllowAutomaticUpdates="True"

        AllowAutomaticInserts="False" AllowAutomaticDeletes="False" AllowFilteringByColumn="True"

        AllowSorting="True" PageSize="20" ShowFooter="True" AllowPaging="True" runat="server"

        GridLines="None" EnableLinqExpressions="false" EnableHeaderContextMenu="true" Height="780px"

        EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="True"

        OnPreRender="RadGrid1_PreRender"

        OnInsertCommand="RadGrid1_InsertCommand"

        OnUpdateCommand="RadGrid1_UpdateCommand"

        OnDeleteCommand="RadGrid1_DeleteCommand"  

        OnNeedDataSource="RadGrid1_NeedDataSource"

        OnItemCommand="RadGrid1_ItemCommand"

        OnItemCreated="RadGrid1_ItemCreated"

        OnItemEvent="RadGrid1_ItemEvent"

        OnExportCellFormatting = "RadGrid1_ExportCellFormatting">

  

        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>

        <GroupingSettings CaseSensitive="false"></GroupingSettings>

        <ExportSettings IgnorePaging="false" ExportOnlyData="true" OpenInNewWindow="true">

            <Pdf PageWidth="1000px" />           

        </ExportSettings>

         

        <MasterTableView DataKeyNames=" ID" AutoGenerateColumns="false" IsFilterItemExpanded="false"

            EditMode="Batch" CommandItemDisplay="Top" AllowFilteringByColumn="True"

            ShowFooter="false" TableLayout="Auto" ShowHeadersWhenNoRecords="true" Width="112%"

            CommandItemSettings-SaveChangesText="Save" CommandItemSettings-CancelChangesText="Cancel"

            CommandItemSettings-AddNewRecordText="Add">

             

            <%--Buttons Settings of Export and Add New--%>

            <CommandItemSettings ShowAddNewRecordButton="true" ShowExportToWordButton="true"

                ShowExportToExcelButton="true" ShowExportToCsvButton="false" ShowExportToPdfButton="true" />

             

            <%--Type of Edit - Show EditMode of one Cell at a time or Row at a time--%>

            <BatchEditingSettings EditType="Cell" />

             

            <%--Sort Expression Settings--%>

            <SortExpressions>

                <telerik:GridSortExpression FieldName="Product_Name" />

            </SortExpressions>

            <Columns>
                 ......
               
</Columns>
        </MasterTableView>        
        <HeaderStyle Height="40px" />
        
        <%-- Functionality Settings  --%>
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
            <Resizing AllowColumnResize="True" AllowRowResize="false" ClipCellContentOnResize="true"
                AllowResizeToFit="true" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" />
            <Scrolling AllowScroll="true" UseStaticHeaders="True" SaveScrollPosition="true"/>
            <Selecting AllowRowSelect="true" />
            <ClientEvents  />
        </ClientSettings>
    </telerik:RadGrid>



I want to show commanditemtemplate in "Top" only.

Please suggest me, what i am missing here.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Dec 2013, 11:51 AM
Hi Venkata,

This is not an expected behavior, your code works fine at my end. Please check your code with this Demo on Batch Editing which shows your similar scenario. If this doesn't help, provide the code behind code as well.

Thanks,
Princy

Tags
Grid
Asked by
Venkata
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or