Working on integrating a Kendo.DropDownList() into a Kendo.Filter object.
It currently works in everyway, other than actually supplying the selected value from the DDL into the datasource / grid binding.
How do I map the Value selected in the Filter Editor Template to the datasource / grid binding. I just need to pass the selected words to be used in the code behind query.
Current Implementation (DDL):
@(Html.Kendo().Filter<KitValidationDtoModel>()
.Name(
"filter"
)
.ApplyButton()
.ExpressionPreview()
.MainLogic(FilterCompositionLogicalOperator.And)
.Fields(f =>
{
f.Add(p => p.OrderId).Label(
"Davidson Order ID"
);
f.Add(p => p.EdiOrderId).Label(
"EDI Order ID"
);
f.Add(p => p.Rfid).Label(
"RFID Tracker"
);
f.Add(p => p.Assy).Label(
"ASSY"
);
f.Add(p => p.Control).Label(
"Control Point"
).EditorTemplateId(
"controlTemplate"
);
f.Add(p => p.Ei).Label(
"End Item"
);
f.Add(p => p.Ship).Label(
"Ship"
);
})
.FilterExpression(f =>
{
f.Add(p => p.Control).IsEqualTo(
""
);
f.Add(p => p.Ship).Contains(
""
);
})
.DataSource(
"dataSource1"
))
<script type="text/x-kendo-template" id="controlTemplate">
@(Html.Kendo().DropDownList()
.Name("control_filter_dll")
.OptionLabel("Select Control Point...")
.DataTextField("Control")
.DataValueField("Control")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetControlPoints", "CustomOrder");
});
}).Events(e => e.Change("onControlChange")).ToClientTemplate())
</script>