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

Multiselect with ints instead of strings

3 Answers 18 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Mattias Hermansson
Top achievements
Rank 1
Mattias Hermansson asked on 20 Jan 2014, 09:38 AM
Hello,
i'm using multiselect with an id as DataTextField instead of a string value, When i try to search for a id in my multiselect i get a error  "".toLowerCase is not a function i'm guessing this is because i use id instead of string. Can i work around this somehow?

          .Name("BaPaymentMachine")
          .Placeholder("Choose value..")
          .DataTextField("Id")
          .DataValueField("BaNumber")
          .DataSource(ds => ds.Read("GetAllBaPayment", "Report"))
          .HtmlAttributes(new { @style = "width:200px;" }))

Thanks in advance

3 Answers, 1 is accepted

Sort by
0
Mattias Hermansson
Top achievements
Rank 1
answered on 20 Jan 2014, 10:06 AM
Solved it. Thanks anyway :)
0
Antje
Top achievements
Rank 1
answered on 21 May 2014, 08:10 AM
Hi everyone,

Mattias did not post his solution - I have the same problem. How can i fix this?

Thanks
0
Petur Subev
Telerik team
answered on 23 May 2014, 07:26 AM
Hello Mattias,

I assume he used one of the following.

You can turn the number type into a string type before returning it from the server.
Or you can use the requestEnd (where you have access to the parsed response object and you can modify it) event of the dataSource to do this transformation.


Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
MultiSelect
Asked by
Mattias Hermansson
Top achievements
Rank 1
Answers by
Mattias Hermansson
Top achievements
Rank 1
Antje
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or