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

Remove Add new record but keep refresh

4 Answers 1796 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Debashis Pyne
Top achievements
Rank 1
Debashis Pyne asked on 22 Jul 2010, 02:19 PM
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!

4 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 22 Jul 2010, 02:23 PM
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
0
Debashis Pyne
Top achievements
Rank 1
answered on 22 Jul 2010, 02:43 PM
Thanks Daniel :)
0
Fazal
Top achievements
Rank 1
answered on 14 Dec 2012, 07:25 AM
One option is
<MasterTableView CommandItemDisplay="None" ...>

Thanks
Abbas
0
Princy
Top achievements
Rank 2
answered on 14 Dec 2012, 07:44 AM
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.
Tags
Grid
Asked by
Debashis Pyne
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Debashis Pyne
Top achievements
Rank 1
Fazal
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or