4 Answers, 1 is accepted
Try adding this piece of code inside the RadGridView.ControlPanelItems tag.
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.
That simple? Thanks, that did the trick.
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?
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.