This is a migrated thread and some comments may be shown as answers.

Server error on click of Custom Button in FileExplorer

1 Answer 147 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Mario
Top achievements
Rank 1
Mario asked on 07 Jul 2010, 10:23 PM

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.







1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 13 Jul 2010, 04:36 PM
Hi Mario,

I have already answered your question in this thread.

Sincerely yours,
Fiko
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
FileExplorer
Asked by
Mario
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or