I have some comboboxes that cascade from one to the other. I would also like to be able to filter based on partial text entered into the combobox. This isn't working out of the box, so I'm working on coding it server-side. It appears that the text is being posted to the servers, but I can't find a server-side object to bind to the post. Here's what's being posted. In my case "Value" is the value of the parent combobox this combobox is cascading from.
I took a look at IFilterDescriptor, FilterDescriptor, and CompositeFilterDescriptor. They seem to have similar fields to those shown above, but they aren't binding when I try to use them as input to my Action method. I haven't had any luck finding a similar thread or any documentation around this.
Again, my end goal is to have cascading comboboxes without losing the ability to filter by text entered, so if there's any advise there, I'm all ears. Also, any advice on how to bind the posted filter info is welcome.
Thanks,
--Evan
Also, here's the definition of my comboboxes as a side note:
<tr>
<td class="formTableLabel">Price Publisher: </td>
<td>
@(Html.Kendo().ComboBox()
.Name("PricePublisherId")
.DataValueField("Value")
.DataTextField("Text")
.BindTo(Model.ReferenceData.PricePublisherList)
.Filter(FilterType.Contains)
.HtmlAttributes(new { required = "required", validationMessage = "Please select an option." }))
</td>
</tr>
<tr>
<td class="formTableLabel">Price Instrument: </td>
<td>
@(Html.Kendo().ComboBox()
.Name("PriceInstrumentId")
.DataValueField("Value")
.DataTextField("Text")
.Placeholder("(Empty)")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetPriceInstrumentList", "TradeEntry").Data("priceInstrumentListJSON").Type(HttpVerbs.Post);
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("PricePublisherId")
.Filter(FilterType.Contains)
.HtmlAttributes(new { required = "required", validationMessage = "Please select an option." }))
</td>
</tr>
I took a look at IFilterDescriptor, FilterDescriptor, and CompositeFilterDescriptor. They seem to have similar fields to those shown above, but they aren't binding when I try to use them as input to my Action method. I haven't had any luck finding a similar thread or any documentation around this.
Again, my end goal is to have cascading comboboxes without losing the ability to filter by text entered, so if there's any advise there, I'm all ears. Also, any advice on how to bind the posted filter info is welcome.
Thanks,
--Evan
Also, here's the definition of my comboboxes as a side note:
<tr>
<td class="formTableLabel">Price Publisher: </td>
<td>
@(Html.Kendo().ComboBox()
.Name("PricePublisherId")
.DataValueField("Value")
.DataTextField("Text")
.BindTo(Model.ReferenceData.PricePublisherList)
.Filter(FilterType.Contains)
.HtmlAttributes(new { required = "required", validationMessage = "Please select an option." }))
</td>
</tr>
<tr>
<td class="formTableLabel">Price Instrument: </td>
<td>
@(Html.Kendo().ComboBox()
.Name("PriceInstrumentId")
.DataValueField("Value")
.DataTextField("Text")
.Placeholder("(Empty)")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetPriceInstrumentList", "TradeEntry").Data("priceInstrumentListJSON").Type(HttpVerbs.Post);
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("PricePublisherId")
.Filter(FilterType.Contains)
.HtmlAttributes(new { required = "required", validationMessage = "Please select an option." }))
</td>
</tr>