This question is locked. New answers and comments are not allowed.
Hello,
I have an array of InsuranceModel and I have a jquery tab that displays the data for each of these in the array. So each tab lists the same Insurance object on each tab and there is a drop down, the same exact drop down. I'm able to bind everything fine except for the Telerik Drop Down and Telerik Calendar. On the first tab the drop down works but on other tabs the drop down doesn't go down. In the controller the value for what the drop down is supposed to return is null. The Telerik dropdown REQUIRES a name that is a string and I can't specifically bind it to one of the elements in the array like a normal control. How can I provide the correct "Name"?
Here is some sample code:
Drop down on view:
Normal control on view that works:
Controller accepting the model on post:
I have an array of InsuranceModel and I have a jquery tab that displays the data for each of these in the array. So each tab lists the same Insurance object on each tab and there is a drop down, the same exact drop down. I'm able to bind everything fine except for the Telerik Drop Down and Telerik Calendar. On the first tab the drop down works but on other tabs the drop down doesn't go down. In the controller the value for what the drop down is supposed to return is null. The Telerik dropdown REQUIRES a name that is a string and I can't specifically bind it to one of the elements in the array like a normal control. How can I provide the correct "Name"?
Here is some sample code:
Drop down on view:
@(Html.Telerik() .DropDownList() .Name("Type") .BindTo(Model[myCounter].Types) .HtmlAttributes(new { style = "width:220px" }) .Value(Model[myCounter].Type)) @Html.TextBoxFor(model => model[myCounter].PayerCode, new { maxlength = 50 })
@Html.ValidationMessageFor(model => model[myCounter].PayerCode)
@Html.ValidationMessageFor(model => model[myCounter].PayerCode)
Controller accepting the model on post:
[HttpPost] [ExportModelStateToTempData] public ActionResult Create(ICollection<InsuranceModel> aModel) {//code}