4 Answers, 1 is accepted
0
Accepted
Hello Marcel,
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.
Regards,
Dilyan Traykov
Telerik
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
0
Marcel
Top achievements
Rank 1
answered on 09 Nov 2015, 08:19 AM
Hi Dilyan.
That simple? Thanks, that did the trick.
Regards,
Marcel
0
Heiko
Top achievements
Rank 1
answered on 08 Apr 2016, 02:45 PM
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
1
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
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.