Multiselect with ints instead of strings

4 posts, 0 answers
  1. Mattias Hermansson
    Mattias Hermansson avatar
    24 posts
    Member since:
    May 2010

    Posted 20 Jan 2014 Link to this post

    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
  2. Mattias Hermansson
    Mattias Hermansson avatar
    24 posts
    Member since:
    May 2010

    Posted 20 Jan 2014 Link to this post

    Solved it. Thanks anyway :)
  3. Kendo UI is VS 2017 Ready
  4. Antje
    Antje avatar
    9 posts
    Member since:
    Oct 2012

    Posted 21 May 2014 in reply to Mattias Hermansson Link to this post

    Hi everyone,

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

    Thanks
  5. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 23 May 2014 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready