Help getting DataTextField value

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

    Posted 11 Mar 2014 Link to this post

    Hello,

    I have a multiselect and all i want is to get the value(s) from the datatextfield  instead of the datavaluefield value.
                            @(Html.Kendo().MultiSelect()
                                  .Name("PrimaryArea")
                                  .Placeholder("Välj primärområde")
                                  .DataTextField("Name")
                                  .DataValueField("SpatialId")
                                  .DataSource(ds => ds.Read("GetAllPrimaryArea", "Report"))
                                  .HtmlAttributes(new { @style = "width:200px;" }))


    Thanks in advance
  2. Mattias Hermansson
    Mattias Hermansson avatar
    24 posts
    Member since:
    May 2010

    Posted 13 Mar 2014 in reply to Mattias Hermansson Link to this post

    Bump
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 13 Mar 2014 Link to this post

    Hello Mattias,

    I would suggest you check the dataItems method, which will return all selected data items. You can use the return result to get the selected texts.

    Regards,
    Georgi Krustev
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  5. Mattias Hermansson
    Mattias Hermansson avatar
    24 posts
    Member since:
    May 2010

    Posted 14 Mar 2014 in reply to Georgi Krustev Link to this post

    Thank you, i will check it out 
Back to Top
UI for ASP.NET MVC is VS 2017 Ready