I have the following drop-down
@(
Html.Kendo().ComboBox()
.Name("products")
.HtmlAttributes(new { style = "width:250px" })
.DataTextField("ProductName")
.DataValueField("ProductID")
.AutoBind(false)
.DataSource(source => {
source.Read(read =>
{
read.Action("GetList", "Submission", new { elementId = Model.Elements[i].FieldId });
})
.ServerFiltering(false);
})
)
The action is hit and the elementId is pass as expected. Now i need to be able to pass the current form and the data. I try as:
@(
Html.Kendo().ComboBox()
.Name("products")
.HtmlAttributes(new { style = "width:250px" })
.DataTextField("ProductName")
.DataValueField("ProductID")
.AutoBind(false)
.DataSource(source => {
source.Read(read =>
{
read.Action("GetList", "Submission", new { elementId = Model.Elements[i].FieldId }).Data("GetForm");
})
.ServerFiltering(false);
})
)
where the GetForm is a javascript function:
function GetForm() {
return $('#subform').serializeArray();
}
But using this i cant get to the action: JsonResult GetList(int? elementId,SubmissionElement model)
Any ideas how can i achieve the passing of the current data in the form to my controller?
@(
Html.Kendo().ComboBox()
.Name("products")
.HtmlAttributes(new { style = "width:250px" })
.DataTextField("ProductName")
.DataValueField("ProductID")
.AutoBind(false)
.DataSource(source => {
source.Read(read =>
{
read.Action("GetList", "Submission", new { elementId = Model.Elements[i].FieldId });
})
.ServerFiltering(false);
})
)
The action is hit and the elementId is pass as expected. Now i need to be able to pass the current form and the data. I try as:
@(
Html.Kendo().ComboBox()
.Name("products")
.HtmlAttributes(new { style = "width:250px" })
.DataTextField("ProductName")
.DataValueField("ProductID")
.AutoBind(false)
.DataSource(source => {
source.Read(read =>
{
read.Action("GetList", "Submission", new { elementId = Model.Elements[i].FieldId }).Data("GetForm");
})
.ServerFiltering(false);
})
)
where the GetForm is a javascript function:
function GetForm() {
return $('#subform').serializeArray();
}
But using this i cant get to the action: JsonResult GetList(int? elementId,SubmissionElement model)
Any ideas how can i achieve the passing of the current data in the form to my controller?