how to hide RadButtonElement control in panel of type RadPanelBarGroupElement

3 posts, 1 answers
  1. khaled
    khaled avatar
    2 posts
    Member since:
    Mar 2016

    Posted 18 Mar Link to this post

    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. Answer
    Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 21 Mar Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. khaled
    khaled avatar
    2 posts
    Member since:
    Mar 2016

    Posted 21 Mar Link to this post

    thanks it is working ! :)
Back to Top