Server error on click of Custom Button in FileExplorer

2 posts, 0 answers
  1. Mario
    Mario avatar
    2 posts
    Member since:
    Jul 2010

    Posted 07 Jul 2010 Link to this post


    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:

    Only items of type Telerik.Web.UI.IRadToolBarButton can initiate postbacks

    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.







  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 13 Jul 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top