I'm using Kendo UI MVC to generate a dynamic form.
User fill the form with Name and Las name. And I have a button that adds a template with two DropDownList with cascading behavior.
Each time user clicks on the add button, a couple of DropDownLists is added using template. Everything works fine.
The name and id of those ddl is Articles.Name and Articles.Quantity each time I add I increment the number between bracket.
The problem is when the user wants to delete one couple of ddl, I find my self with not continuous ids :
When user deletes the second one I have :
This don't work because the mode binder in my action controller will stop at 0 if he doesn't find the index 1.
I tried updating the inputs with jquery, but this breaks the cascading behavior of the kendo DDL.
So is there a way to update the ID and name of a kendo DDL without breaking the cascading behavior ?