Remove Add new record but keep refresh

5 posts, 1 answers
  1. Debashis Pyne
    Debashis Pyne avatar
    66 posts
    Member since:
    Apr 2010

    Posted 22 Jul 2010 Link to this post

    Hi,

    How can I remove the "Add new record" link but keep the "Refresh" link in a RadGrid?
    I have used the following code - but it removed both.

    ------------------------------------------------------------------------------------------

    <telerik:RadGrid ID="grdHeadlineList" Skin="WebBlue"
    runat="server" GridLines="None"
    AutoGenerateColumns="False"
    AllowSorting="True"
    AllowFilteringByColumn = "true"
    AllowPaging="True" PageSize="10"
    OnNeedDataSource="grdHeadlineList_NeedDataSource"                                       
    OnItemCommand="grdHeadlineList_ItemCommand"
    OnItemDataBound="grdHeadlineList_ItemDataBound"
    OnItemCreated="grdHeadlineList_ItemCreated">

    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>                               
    <MasterTableView DataKeyNames="Headline_Id" CommandItemDisplay="Top" EditMode="PopUp">                               
    <EditFormSettings PopUpSettings-Modal="true" />
    <Columns>
    ---

    </Columns>
    <CommandItemTemplate>
    <div style="height:25px"></div>
    </CommandItemTemplate>
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true"></ClientSettings>
    </telerik:RadGrid>

    ------------------------------------------------------------------------------------------

    Thanks!

  2. Answer
    Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 22 Jul 2010 Link to this post

    Hello Debashis,

    You can hide the AddNewRecord button this way:
    <MasterTableView CommandItemDisplay="Top" ...>
        <CommandItemSettings ShowAddNewRecordButton="false" />
    ...

    Please examine the following link for more information:
    CommandItem Overview

    Best regards,
    Daniel
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Debashis Pyne
    Debashis Pyne avatar
    66 posts
    Member since:
    Apr 2010

    Posted 22 Jul 2010 Link to this post

    Thanks Daniel :)
  5. Fazal
    Fazal avatar
    2 posts
    Member since:
    Dec 2012

    Posted 14 Dec 2012 Link to this post

    One option is
    <MasterTableView CommandItemDisplay="None" ...>

    Thanks
    Abbas
  6. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Dec 2012 Link to this post

    Hi Fazal,
     
    If you set the CommandItemDisplay property to 'None' the CommandItem won't be displayed at all. In order to display the Refresh button and hide 'Add New Record' Button, please set the CommandItemSettings property ShowAddNewRecordButton to 'False'.

    Thanks,
    Princy.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017