I have added a custom button to the FileExplorer using this code:
//custom button |
RadToolBarButton customButton = new RadToolBarButton("Properties"); |
//customButton.CssClass = "test_button"; |
customButton.Value = "EditProperties"; |
customButton.CommandName = "EditProperties"; |
DocFileExplorer.ToolBar.Items.Add(customButton); |
DocFileExplorer.ToolBar.ButtonClick += new RadToolBarEventHandler(toolBar_ButtonClick); |
protected void toolBar_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) |
{ |
//your logic here |
} |
The custom button is displayed. However, when I click on it, I get this error:
Server Error in '/' Application.
Only items of type Telerik.Web.UI.IRadToolBarButton can initiate postbacks
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.InvalidOperationException: Only items of type Telerik.Web.UI.IRadToolBarButton can initiate postbacks
I will appreciate any help.