This is a migrated thread and some comments may be shown as answers.

DropDownList with Virtualization for SSN

1 Answer 14 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Dhruv
Top achievements
Rank 1
Dhruv asked on 10 Jul 2017, 08:52 PM

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)
    

1 Answer, 1 is accepted

Sort by
0
Dhruv
Top achievements
Rank 1
answered on 10 Jul 2017, 09:14 PM

Please delete this thread, not sure how it submitted before i finished. Full post 

 

http://www.telerik.com/forums/dropdownlist-with-virtualization-for-ssn-a9839b946da5

Tags
DropDownList
Asked by
Dhruv
Top achievements
Rank 1
Answers by
Dhruv
Top achievements
Rank 1
Share this question
or