I have a grid popup edit template that includes a Kendo dropdown. I need to pass a model property value as the parameter to the Read() method of the dropdown. But the model is null when the Read() method gets called. So the value is always 0.
I've defined the Field in the parent grid. I even added it as a column too. Model.ProductId is always 0.
How do I pass a value from the popup editor model to the controller for the dropdown?
@(Html.Kendo().DropDownList() .Name("WarehouseId") .OptionLabel("Select a warehouse...") .HtmlAttributes(new { style = "width: 100%" }) .DataTextField("Text") .DataValueField("Value") .Value("-1") .DataSource(source => { source.Read(read => { read.Action("Inventory_Warehouse_Read", "Purchasing", new { productId = @Model.ProductId}); }); }) .Height(400) )