7 Answers, 1 is accepted
0
Hello Rene,
You can use CommandButtonsVisibility Enumeration like so:
Regards,
Vera
Telerik
You can use CommandButtonsVisibility Enumeration like so:
CommandButtonsVisibility="Navigation,Edit,Delete,Commit,Cancel"
Regards,
Vera
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0

ITA
Top achievements
Rank 1
answered on 02 Jun 2013, 01:55 PM
Hi,
thanks this is perfect, but how to set this in code behind?
Thanks
Best Regards
Rene
thanks this is perfect, but how to set this in code behind?
Thanks
Best Regards
Rene
0
Hi Rene,
Regards,
Yoan
Telerik
You can set RadDataForm's CommandButtonsVisibility property in code-behind like so:
using Telerik.Windows.Controls.Data.DataForm;
.
.
this.RadDataForm1.CommandButtonsVisibility = DataFormCommandButtonsVisibility.Cancel;
Regards,
Yoan
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0

ITA
Top achievements
Rank 1
answered on 03 Jun 2013, 07:14 AM
Hi,
thanks so much, but how do i get this:
CommandButtonsVisibility="Edit,Commit,Cancel" ?
Thanks
Rene
thanks so much, but how do i get this:
CommandButtonsVisibility="Edit,Commit,Cancel" ?
Thanks
Rene
0
Hi Rene,
Regards,
Yoan
Telerik
Please check the following code snippet for a reference:
this.RadDataForm1.CommandButtonsVisibility = DataFormCommandButtonsVisibility.Edit | DataFormCommandButtonsVisibility.Delete | DataFormCommandButtonsVisibility.Cancel;
Regards,
Yoan
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0

ITA
Top achievements
Rank 1
answered on 04 Jun 2013, 11:11 AM
Hi,
this is great but one more Problem. I tried this:
But this will not work! The Add Button is not visible! The main Problem is that the user could have the permission "edit,delete" or "edit,new" or "new,delete" ,.... So i have to set the buttonVisibility, but it's not possible to do that?!
Thanks
Regards
Rene
this is great but one more Problem. I tried this:
foreach (DataRow RollenROW in RollenTAB.Rows)
{
// Do not Show Customer
if (RollenROW.Field<
Int64
>("KDzeigen") == 0) { KundenForm.ItemsSource = null; }
// Delete Customer
if (RollenROW.Field<
Int64
>("KDloeschen") == 1)
{
KundenForm.CommandButtonsVisibility = KundenForm.CommandButtonsVisibility | DataFormCommandButtonsVisibility.Delete;
}
// Edit Customer
if (RollenROW.Field<
Int64
>("KDaendern") == 1)
{
KundenForm.CommandButtonsVisibility = KundenForm.CommandButtonsVisibility | DataFormCommandButtonsVisibility.Edit;
}
// New Customer
if (RollenROW.Field<
Int64
>("KDneu") == 1)
{
KundenForm.CommandButtonsVisibility = KundenForm.CommandButtonsVisibility | DataFormCommandButtonsVisibility.Add;
}
}
But this will not work! The Add Button is not visible! The main Problem is that the user could have the permission "edit,delete" or "edit,new" or "new,delete" ,.... So i have to set the buttonVisibility, but it's not possible to do that?!
Thanks
Regards
Rene
0
Hi Rene,
Yoan
Telerik
Please open a support ticket to send us a very basic runnable sample project, so we can reproduce the issue and debug the application accordingly. This will enable us to determine the cause of the problem and to provide an accurate solution.
Yoan
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.