how to clone kendo combox using jquery

4 posts, 0 answers
  1. Ravi
    Ravi avatar
    1 posts
    Member since:
    Oct 2011

    Posted 24 May 2012 Link to this post

     
    <input type="button" name="name" value="MakeClone " id="btnRow" />


    <
    table>
                <tbody>
                    <tr id="AssRow">
                        <td>
                            <input id="titles" />
                        </td>
                    </tr>
                </tbody>
            </table>

    on click of button to Clone the row and add the unique id to it.

    <script type="text/javascript">
    $(functionn(){
    $('#btnRow').on("click", function () {
     $("#AssRow").clone(true).find("input").each(function () {
            $(this).val('').attr('id', function (_, id) { return id + i });
            }).end().appendTo("table");
     
            i++;
     
            });
    });
    </script>


    as of now its not working correctly. whenever i click on the cloned combo box it will open the orginal combo - box. can you give me a sample to do clone with jquery with unique id. and getting value from it.
  2. Nicky
    Nicky avatar
    2 posts
    Member since:
    Oct 2012

    Posted 30 Oct 2012 Link to this post

    I have met the seam question, anybody can give me a hand.
  3. Kendo UI is VS 2017 Ready
  4. Gaurav
    Gaurav avatar
    1 posts
    Member since:
    May 2009

    Posted 07 Nov 2012 Link to this post

    I have the same problem Please help below is the code i have used to clone the combobox

    $(

     

    "#grid tr:first").clone(true).find("input").each(function () {
       $(
    this).attr({

     

     

     

       'id': function (_, id) { return id + i },

     

     

     

       'name': function (_, name) { return name + i }

     

    });

    }).end().appendTo(

     

    "#grid");

    however when i click on the new combobox it opens the original one.

     

  5. Tim Harker
    Tim Harker avatar
    12 posts
    Member since:
    Jul 2009

    Posted 23 Aug 2013 Link to this post

    Did this ever get answered?
Back to Top
Kendo UI is VS 2017 Ready