Buttons not wrapping in <a> tags

3 posts, 1 answers
  1. Chris
    Chris avatar
    3 posts
    Member since:
    Mar 2009

    Posted 16 Feb 2010 Link to this post

    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. Answer
    robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 17 Feb 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 18 Feb 2010 Link to this post

    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.
Back to Top