I have an application which allows users to dynamically create divs containing kendo inputs. To do so I have a div which contains multiple kendo inputs which I use as a sort of template. When the user decides to add a section to the page, i clone my div using jquery.clone(). Everything looks fine in the UI, but since the kendo inputs only get initialized one time in HTML and are then copied, the inputs are not rebuilt therefore the initial ID is not unique and the inputs are not functional.
I tried to fix this programmatically by doing
var $kendoInputs = $$(".draggableContainer .k-input");
for (var j = 0; j < $kendoInputs.length; j++) {
if ($($kendoInputs[j]).attr("id")) {
var newid = "newid" + j;
$($kendoInputs[j]).attr("id", newid).attr("name", newid);
}
}
but since the inputs have already been initialized, changing the ids at this point is useless. Is there any way to change the ID of a kendo input and then rebuild it?
Sorry for the long block of text and thanks in advance