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

Buttons get "visibility: hidden !important"

1 Answer 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
pawelg
Top achievements
Rank 1
pawelg asked on 20 Aug 2012, 01:42 PM
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.

1 Answer, 1 is accepted

Sort by
0
pawelg
Top achievements
Rank 1
answered on 20 Aug 2012, 08:21 PM
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.
Tags
General Discussions
Asked by
pawelg
Top achievements
Rank 1
Answers by
pawelg
Top achievements
Rank 1
Share this question
or