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

Configure CommandButtonsVisibility from code

2 Answers 90 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.
Kurt
Top achievements
Rank 1
Kurt asked on 22 Feb 2018, 03:00 PM

Hi,

Can't seem to find the way to set CommandButtonsVisibility from code behind. I'm building a user control with dynamic behavior the DataForm.

In XAML it's easy and working.

Anybody that has an idea?

Thanks in advance!

Kurt

2 Answers, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 27 Feb 2018, 09:55 AM
Hello Kurt,

Here's how you can set multiple values for the CommandButtonsVisibility flags enum using the bitwise OR operator ( | ):

dataForm.CommandButtonsVisibility = DataFormCommandButtonsVisibility.Add | DataFormCommandButtonsVisibility.Delete;

To add a value to the list of already assigned values, you can use the |= assignment operator:

dataForm.CommandButtonsVisibility |= DataFormCommandButtonsVisibility.Edit;

Please let me know if this works for you.

Regards,
Dilyan Traykov
Progress Telerik
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.
0
Kurt
Top achievements
Rank 1
answered on 27 Feb 2018, 02:52 PM
Works like a charm!!
Tags
DataForm
Asked by
Kurt
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Kurt
Top achievements
Rank 1
Share this question
or