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

Buttons not wrapping in <a> tags

2 Answers 30 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 16 Feb 2010, 10:37 PM
I'm working with Telerik v. 2009.2.701.35

I have some buttons on a form rendering inside a table.  If I create them as <input type="button> they do not decorate at all.  If I change it to a <button> tag, it seems to pick up the css from the skin's style sheet and apply the correct background, but the right side border is missing.  This right side border is supposed to be the background of the <a> tag, based on what I've seen in the demo.

I tried using javascript to style the form in real time, and it works, but again it skips the buttons.  It styles the other form elements just fine. The example I followed to do this is here: http://www.telerik.com/support/kb/aspnet-ajax/formdecorator/decorate-dynamically-added-controls-by-using-radformdecorator.aspx

Here is an example of the HTML on my page in which buttons are not being decorated.
<table class="string-group-list"><tbody id="TestGroupedInputTable"><tr> 
            <th>One Header</th> 
            <th>Two Header</th> 
            <th>Three Header</th> 
            <td><button class="sgl-button" onclick="sglAddNew('TestGroupedInput', 3);" name="TestGroupedInputAddNew" type="button" id="TestGroupedInputAddNew">Add New</button></td
        </tr> 
        <tr id="TestGroupedInputRow0"
            <td><input type="text" class="sgl-input rfdDecorated" value="a" id="TestGroupedInputInput0_0" name="TestGroupedInputInput0_0"></td> 
            <td><input type="text" class="sgl-input rfdDecorated" value="s" id="TestGroupedInputInput0_1" name="TestGroupedInputInput0_1"></td> 
            <td><input type="text" class="sgl-input rfdDecorated" value="2" id="TestGroupedInputInput0_2" name="TestGroupedInputInput0_2"></td> 
            <td><button class="sgl-button" onclick="sglDelRow('TestGroupedInput','TestGroupedInputRow0');" name="TestGroupedInputDelete0" type="button" id="TestGroupedInputDelete0">Delete</button></td
        </tr> 
        </tbody></table

I don't think my CSS is causing this issue because like I said, the <a> tag wrappers are not being created at all.

Thanks for looking,
-Chris

2 Answers, 1 is accepted

Sort by
0
Accepted
robertw102
Top achievements
Rank 1
answered on 17 Feb 2010, 08:43 PM
I noticed that your <button> tag has a css class set on it. I believe the FormDecorator skips any controls that have a css class set, to avoid breaking the styles used on the button.

I think that is why it's not decorating your buttons.
0
Georgi Tunev
Telerik team
answered on 18 Feb 2010, 01:30 PM
Hi Chris,

Indeed, Robert is right - if there is a class property set, RadFormDecorator will not style that control.


Best wishes,
Georgi Tunev
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
FormDecorator
Asked by
Chris
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or