Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Toolbar > event from an inherited button
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered event from an inherited button

Feed from this thread
  • Jiří avatar

    Posted on Apr 15, 2009 (permalink)

    I have RadToolbar including some ExtendedRadToolbarButton : RadToolbarButton controls. When a click event is fired, I am not able to cast RadToolbarClickEventArgs.Button to my ExtendedButton. It is always null.
    Is this right behavior or have I done somethong wrong?

    RadToolbar is inserted in a RadGrid CommandItemTemplate.

    Thanks for information

    Jiří Nouza

  • Atanas Korchev Atanas Korchev admin's avatar

    Posted on Apr 16, 2009 (permalink)

    Hi Jiří,

    Unfortunately you cannot extend the RadToolBarButton. The sole reason is that after postback RadToolBar always instantiates the base type when creating its items from viewstate.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  • Jiří avatar

    Posted on Apr 22, 2009 (permalink)

    Ok, I see.

    However I am doing it in other way because RadGrid is included in a CommandItemTemplate and I have to always create RadToolBar and its items collection containing my controls. Nevermind, i exposed an extra Collection with my controls to find it using comandname.

    The next problem might be connected with this fact and it is that RadToolbarToggleButton does not reflect click and does not change state. It has is always its defalut value.I resolved it in a toolbar click event, where I read previous ViewState toggled value (when is available), invert it and store in a ViewState. However I am not sure it is the best solution.

    I think the problem is similar to: http://www.telerik.com/community/forums/aspnet/grid/100465-commanditemtemplate-viewstate-problem.aspx#393727

    Jirka Nouza




Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Toolbar > event from an inherited button