I have been trying to implement a search which search using SSN with and without dashes while using a DropDownList with Virtualization. I have everything working perfectly if you type with the "-" but also want it to work without the "-"
01.
@Html.LabelFor(model => model.VisitorID)
02.
@(Html.Kendo().DropDownList()
03.
.Name(
"VisitorID"
)
04.
.DataTextField(
"Value"
)
05.
.DataValueField(
"ID"
)
06.
.MinLength(2)
07.
.HtmlAttributes(
new
{ style =
"width:100%"
})
08.
.Height(290)
09.
.Filter(FilterType.Contains)
10.
.DataSource(source =>
11.
{
12.
source.Custom()
13.
.ServerFiltering(
true
)
14.
.ServerPaging(
true
)
15.
.PageSize(80)
16.
.Type(
"aspnetmvc-ajax"
)
//Set this type if you want to use DataSourceRequest and ToDataSourceResult instances
17.
.Transport(transport =>
18.
{
19.
transport.Read(
"Virtualization_GetVisitor"
,
"Lookups"
);
20.
})
21.
.Schema(schema =>
22.
{
23.
schema.Data(
"Data"
)
//define the [data](http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.data) option
24.
.Total(
"Total"
);
//define the [total](http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.total) option
25.
});
26.
})
27.
.Virtual(v => v.ItemHeight(26).ValueMapper(
"VisitorLookups"
))
28.
.NoDataTemplate(
"<a onclick=\"addNewEntityPartial(\'Visitor\');\">Add a new Visitor</a>"
)
29.
)
30.
@Html.ValidationMessageFor(model => model.VisitorID)