Hello, I'm trying to add a Split Button to a standard asp.net DataGrid. I'd like to be able to handle the ItemCommand event to response to clicks on the button or associated menu item. Is this possible? Can I somehow make the menu click change the CommandName of the associated button?
Yes it is possible, however, you should take in mind the fact that args.IsSplitButtonClick() method is available only for OnClientClicked event which is not cancelable. Therefore I can suggest that you utilize two RadButtons as follows:
- The first RadButton will be split button and will have its AutoPostBack property set to false. It will be the UI button.
- The second RadButton will be the hidden in a span and will perform the actual postback.
You can find the full runnable VS example on this approach in the attached archive.
Regards,
Danail Vasilev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.