iam getting error Mobjlineitem not defined
<tbody data-bind="foreach: MobjLineitems">
<tr>
<td>
<input data-bind="@Html.DataBinding(m => m.MobjLineitems, it => it.MobjLineitem.productid)" type="text" value="" />
</td>
<td class="number">
<input data-bind="@Html.DataBinding(m => m.MobjLineitems, it => it.MobjLineitem.rate)" type="text" value="" class="number pure-input-2-3" />
</td>
<td class="number">
<input data-bind="@Html.DataBinding(m => m.MobjLineitems, it => it.MobjLineitem.quantity)" type="text" value="" class="number pure-input-2-3" />
</td>
<td class="number">
<input data-bind="value: Value" readonly="readonly" type="text" value="" class="number pure-input-2-3" />
</td>
<td>
<input type="button" class="pure-button" data-bind="click: $parent.delItem" value="delete"/>
</td>
</tr>
</tbody>
Iam using helper as below
public static string DataBinding<TModel, U, V>(this HtmlHelper<TModel> helper, Expression<Func<TModel, IEnumerable>> listExpr,
Expression<Func<U, V>> memberExpr)
{
var meta = ModelMetadata.FromLambdaExpression(listExpr, helper.ViewData);
var listName = meta.PropertyName;
string itemName = GetFullPropertyName(memberExpr);
return string.Format("value: {1}, attr: {{ id : '{0}_' + $index() + '__{1}', name: '{0}[' + $index() + '].{1}' }}",listName, itemName);
}
itemName is having value Mobjlineitem.productid
when its just productid there is no error
Any solution?