Hi Team,
We are having issues on Html.Kendo().TabStrip(). We are not able to pass our model to Html.Kendo().TabStrip(). There two issues on this.
1. If i have partial view which is called in the TabStrip. If i have the data in the model still i am not able to pass it to the partial view.
2. If i get the data in my partial view in the HttpPost the model data is becoming null.
Sample code.
Main View
@(Html.Kendo().TabStrip()
.Name("assetTabStrip")
.Items(assetTabStrip => assetTabStrip.Add().Text("Field Criteria")
.Selected(true)
.LoadContentFrom("EditFieldCriteria", "Asset", new { GroupID = Model.GroupID }))
.Items(assetTabStrip => assetTabStrip.Add().Text("Sort Criteria")
.LoadContentFrom("EditSortCriteria", "Asset", new { GroupID = Model.GroupID }))
.Animation(false)
)
Partial view
@model Sage.FA.SFAO.WebSite.Models.Asset.GroupModel
@using EnumHtmlHelper.Helper
@{
ViewBag.Title = "EditFieldCriteria";
}
<table>
<tr>
<td align="left">@Html.Label("Look In:")</td>
<td align="left">@Html.Label("Select an Operator:")</td>
<td align="left">
@Html.Label("Find What:")
</td>
</tr>
@foreach (var item in Model.Criteria) {
if (item.LookIn != 0 && item.Operator != 0 && item.Value != null)
{
<tr>
<td>
@Html.EnumDropDownListFor(modelitem => item.LookIn)
</td>
<td>
@Html.EnumDropDownListFor(modelitem => item.Operator)
</td>
<td>
@Html.TextBoxFor(modelitem => item.Value, new { @class = "k-textbox", @id = "expenseGL" })
</td>
</tr>
}
}
</table>
My Post method
[HttpPost]
public ActionResult EditGroup(GroupModel groupModel, FormCollection formCollection)
groupModel.Criteria became null.
Please help.
We are having issues on Html.Kendo().TabStrip(). We are not able to pass our model to Html.Kendo().TabStrip(). There two issues on this.
1. If i have partial view which is called in the TabStrip. If i have the data in the model still i am not able to pass it to the partial view.
2. If i get the data in my partial view in the HttpPost the model data is becoming null.
Sample code.
Main View
@(Html.Kendo().TabStrip()
.Name("assetTabStrip")
.Items(assetTabStrip => assetTabStrip.Add().Text("Field Criteria")
.Selected(true)
.LoadContentFrom("EditFieldCriteria", "Asset", new { GroupID = Model.GroupID }))
.Items(assetTabStrip => assetTabStrip.Add().Text("Sort Criteria")
.LoadContentFrom("EditSortCriteria", "Asset", new { GroupID = Model.GroupID }))
.Animation(false)
)
Partial view
@model Sage.FA.SFAO.WebSite.Models.Asset.GroupModel
@using EnumHtmlHelper.Helper
@{
ViewBag.Title = "EditFieldCriteria";
}
<table>
<tr>
<td align="left">@Html.Label("Look In:")</td>
<td align="left">@Html.Label("Select an Operator:")</td>
<td align="left">
@Html.Label("Find What:")
</td>
</tr>
@foreach (var item in Model.Criteria) {
if (item.LookIn != 0 && item.Operator != 0 && item.Value != null)
{
<tr>
<td>
@Html.EnumDropDownListFor(modelitem => item.LookIn)
</td>
<td>
@Html.EnumDropDownListFor(modelitem => item.Operator)
</td>
<td>
@Html.TextBoxFor(modelitem => item.Value, new { @class = "k-textbox", @id = "expenseGL" })
</td>
</tr>
}
}
</table>
My Post method
[HttpPost]
public ActionResult EditGroup(GroupModel groupModel, FormCollection formCollection)
groupModel.Criteria became null.
Please help.