I have a checkbox in list and it fill dynamically from database, after fill the list when i submit the form all the details passing to the model class except Checkbox value.
@if (Model.FeeInstallmentList != null)
{
for (int i = 0; i < Model.FeeInstallmentList.Count; i++)
{
<tr>
<td>@Html.CheckBoxFor(model => model.FeeInstallmentList[i].CheckInstallment, new { @Name = "checkInstallment", @id = "checkInstallment" + i ,@class
= "checkInstallment"})</td>
<td>@Html.DisplayFor(model => model.FeeInstallmentList[i].NoOfInstallment)</td>
<td>@Html.DisplayFor(model => model.FeeInstallmentList[i].InstallmentAmount)</td>
<td>@Html.DisplayFor(model => model.FeeInstallmentList[i].FromDate)</td>
<td>@Html.DisplayFor(model => model.FeeInstallmentList[i].Todate)</td>
<td>@Html.DisplayFor(model => model.FeeInstallmentList[i].Status,new { @id = "Status"})</td>
</tr>
}
}
Aucun commentaire:
Enregistrer un commentaire