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

Could not disable the edit commands on RadGrid toolbar

1 Answer 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Juliano
Top achievements
Rank 1
Juliano asked on 12 Jan 2017, 12:15 AM

I'm trying to disable or hide the toolbar buttons of a RadGrid on PageLoad, using the following code as suggested in one of the answers from http://www.telerik.com/forums/enable-disable-add-edit-button-in-rad-grid

 

radGrid.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = false;

 

However, the buttons keep visible and working after this. Why? And how can I fix this?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 16 Jan 2017, 09:58 AM
Hello Juliano,

If you are setting the property too late in the page life cycle you will have to call the Rebind method of the control in order for the property to be applied in the rendering. 

Can you please call the Rebind method of the grid and see if that resolves the issue with the AddNewRecord button. Note that if you want to remove the entire command item you should set the RadGrid1.MasterTableView.CommandItemDisplay to GridCommandItemDisplay.None.

Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Juliano
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or