Controlpanel Button instead RadDropDownButton

5 posts, 1 answers
  1. Marcel
    Marcel avatar
    2 posts
    Member since:
    Jun 2015

    Posted 05 Nov 2015 Link to this post

    Hi,

    I'm trying to change the controlpanelitem RadDropdownButton into a RadButton. So far any luck. Does anybody know how this can be done?

    Thanks in advance!

     

     

  2. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 06 Nov 2015 Link to this post

    Hello Marcel,

    Try adding this piece of code inside the RadGridView.ControlPanelItems tag.

    <telerik:ControlPanelItem>
        <telerik:ControlPanelItem.ButtonContent>
            <telerik:RadButton Content="Click Me!" Click="RadButton_Click"/>
        </telerik:ControlPanelItem.ButtonContent>
    </telerik:ControlPanelItem>

    Then you can define the logic behind your button in the RadButton_Click method as explained in this help article. You can also take a look at this article, regarding the RadGridView Control Panel as well as the examples provided in our SDK samples browser.

    Regards,
    Dilyan Traykov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Marcel
    Marcel avatar
    2 posts
    Member since:
    Jun 2015

    Posted 09 Nov 2015 Link to this post

    Hi Dilyan.

    That simple? Thanks, that did the trick.

    Regards,

    Marcel

     

  5. Heiko
    Heiko avatar
    124 posts
    Member since:
    Oct 2012

    Posted 08 Apr Link to this post

    Hi Dilyan,

    the answer is fine but not satisfying. Now you have a button inside a button - not so great since the ControlPanelItem is some kind of button itself. Besides that it looks ugly.  What I want is just the ControlPanelItem (=button) to execute a command on my ViewModel. How can this be achieved?

    Regards
    Heiko

  6. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 11 Apr Link to this post

    Hello Heiko,

    You are free to modify the ControlPanelItemControl ControlTemplate however you like.

    I've attached a sample project where I've removed the RadDropDownButton as a whole and setup a RadButton which is bound to a Command in the ViewModel. 

    Please have a look and let me know if this would work for you.

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WPF is Visual Studio 2017 Ready