how to bind dropdownlistbox and radiobuttonlist RRS feed

  • Question

  • User558493921 posted

    Hi All,

       I want to populate dropdownlistbox and radiobuttonlist values from db on $(document).ready. How i can achieve this

    Monday, January 8, 2018 7:33 AM

All replies

  • User-832373396 posted

    <g class="gr_ gr_8 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="8" data-gr-id="8">Hi</g> <g class="gr_ gr_5 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="5" data-gr-id="5">srijay</g>,

    Sir, please refer to this easiest way using jquery:

    $("#SP").append("<input type='radio' checked='checked' id='xx' value='xx' />"); 

    Or way2:

    var NewNode = document.createElement("input");
    NewNode.setAttribute("name", "sp");
    NewNode.setAttribute("id", item.id);
    NewNode.setAttribute("value", item.mc);
    NewNode.setAttribute("type", "Radio");

    Reference: https://www.w3schools.com/jquery/html_append.asp 

    With regards, Angelina Jolie

    Tuesday, January 9, 2018 7:01 AM