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

how to hide RadButtonElement control in panel of type RadPanelBarGroupElement

2 Answers 72 Views
Panel
This is a migrated thread and some comments may be shown as answers.
khaled
Top achievements
Rank 1
khaled asked on 18 Mar 2016, 09:18 PM
In my application 
I  have  Telerik.WinControls.UI.RadPanelBarGroupElement 
panel called "panelCompany"  , and it has collections  of three items of type
RadButtonElement

items called 
addCompany 
deleteCompany 
updateCompany

 in  my application  ,  i prevent some users to use delete option , so hide "deleteCompany "

FormMain.deleteCompany.Visibility = Telerik.WinControls.ElementVisibility.Hidden

at this  point any thing is OK  , but when i click on panel "panelCompany " ,  the button "deleteCompany" is visible again 
what can i do to hide RadButtonElement  control forever ?

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 21 Mar 2016, 11:02 AM
Hi Khaled,

Thank you for writing back.

You can add or remove the button instead. For example:
//remove
 _radPanelBarGroupElement.Items.Remove(button3);
//insert
 _radPanelBarGroupElement.Items.Insert(2, button3);

Let me know if you have additional questions.

Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
khaled
Top achievements
Rank 1
answered on 21 Mar 2016, 11:31 PM
thanks it is working ! :)
Tags
Panel
Asked by
khaled
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
khaled
Top achievements
Rank 1
Share this question
or