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

how to clone kendo combox using jquery

3 Answers 189 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 24 May 2012, 06:38 PM
 
<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.

3 Answers, 1 is accepted

Sort by
0
Nicky
Top achievements
Rank 1
answered on 30 Oct 2012, 08:03 AM
I have met the seam question, anybody can give me a hand.
0
Gaurav
Top achievements
Rank 1
answered on 07 Nov 2012, 06:48 AM
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.

 

0
Tim Harker
Top achievements
Rank 2
answered on 23 Aug 2013, 05:54 PM
Did this ever get answered?
Tags
ComboBox
Asked by
Ravi
Top achievements
Rank 1
Answers by
Nicky
Top achievements
Rank 1
Gaurav
Top achievements
Rank 1
Tim Harker
Top achievements
Rank 2
Share this question
or