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

How disable add button in edit mode

1 Answer 162 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nelson
Top achievements
Rank 1
Nelson asked on 24 May 2011, 12:19 PM
Hi,

I´m using the RadDataForm, but I have one problem. When I go to Edit Mode, I want that the add and delete buttons goes disable.

How can I do that?

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavel Pavlov
Telerik team
answered on 30 May 2011, 09:32 AM
Hello Nelson,

The enabled / disabled state of the buttons is controlled internally by  a logical check whether the source collection allows or not adding /deleting of items.

So as a workaround I may suggest to handle the Beginning Edit event. Inside the event you may hide the Add button ,  and after edit  - show it again .
For this you will need to use the CommandButtonsVisibility property.

In case you have troubles implementing this , just let me know what kind of source collection do you use , and I will prepare a small sample for you.

Greetings,
Pavel Pavlov
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
Tags
DataForm
Asked by
Nelson
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or