Buttons get "visibility: hidden !important"

2 posts, 0 answers
  1. pawelg
    pawelg avatar
    9 posts
    Member since:
    Aug 2012

    Posted 20 Aug 2012 Link to this post

    Hello,
    I have created a web control that contains RadGrid based on this example: http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/outlookstyle/defaultcs.aspx.

    The problem is, all the buttons on this page are hidden - including those in the RadGrid used for grouping. Firebug shows:
    button, input[type="submit"], input[type="reset"], input[type="button"], input[type="checkbox"], input[type="radio"], select {
        visibility: hidden !important;
    }

    If I remove "hidden" in firebug, buttons work well. Why is the visibility set to hidden? I've found on this forum that it can be caused by RadFormDecorator. I'm using class "BasePage" that all the classes in the project inherit from. There, in OnPageLoad event I have:

    Master.Controls.OfType<HtmlGenericControl>().First(t => t.TagName == "html")
                      .Controls.OfType<HtmlForm>().First()
                      .Controls.Add(new RadFormDecorator { DecoratedControls = FormDecoratorDecoratedControls.Fieldset |  FormDecoratorDecoratedControls.Buttons });

    When I skip this step during debugging, buttons are displayed and grouping works. But I have no idea how to solve that problem.

    Buttons and grid work correctly on other pages/controls in the solution. I haven't noticed any difference between my page and the others that could have any influence on that situation like additional scripts, styles etc.

    What could be wrong?

    Thank you in advance.

  2. pawelg
    pawelg avatar
    9 posts
    Member since:
    Aug 2012

    Posted 20 Aug 2012 Link to this post

    Ok, I've just solved my problem. All I had to do was to remove:
    <ClientEvents OnGridCreated="GridCreated" />
    as this function doesn't exist anymore and I forgot to remove this declaration.
Back to Top