MobileListView does not call read method

4 posts, 2 answers
  1. Sean
    Sean avatar
    19 posts
    Member since:
    Jun 2012

    Posted 14 Mar 2014 Link to this post

    Something strange is baffling me with regard to the mobile list view. Here is the syntax:

    @(Html.Kendo().MobileView()
          .Name("detail")
          .Title("Attendance Monitor")
          .Layout("MobileLayout")
          .Content(obj =>
              Html.Kendo().MobileListView()
                      .Name("ParkListDetail")
                          .TemplateId("detailTemplate").AutoBind(true)
                          .DataSource(dataSource => dataSource.Read(read => read.Action("ReadDetails", "Mobile"))))
      )

    The method, 'ReadDetails' is not getting called. However, if I put a regular list view on the page, it loads just fine:

    @(Html.Kendo().ListView(Model)
                      .Name("ParkListSummary")
                      .TagName("div")
                          .ClientTemplateId("summaryTemplate").AutoBind(true)
                          .DataSource(dataSource => dataSource
                              .Read("ReadDetails", "Mobile")
                              .Model(model => model.Id(park => park.ParkID))
                          ))


    What am I missing? I want to have a certain portion of my application as mobile-friendly, but the mobile widgets are not playing nice. I have been through every demo on the site for the list view, but nothing works for me.

    Sean~
  2. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 18 Mar 2014 Link to this post

    Hi Sean,

    Do you get any JavaScript errors when you run the application? Can you please provide us with a runnable sample, where this issue is reproduced?

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Sean
    Sean avatar
    19 posts
    Member since:
    Jun 2012

    Posted 18 Mar 2014 in reply to Kiril Nikolov Link to this post

    Hi Kiril,

    Thanks for the reply. I actually discovered my issue. I was leaving off the application start. Once I added  @(Html.Kendo().MobileApplication()), everything worked as desired.

    Great thus far! I am still learning the ins and outs of the mobile stuff, but as usual, the controls are really nice.

    Thanks again,




  5. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 20 Mar 2014 Link to this post

    Hello Sean,

    I am really happy to hear that you like the controls. In case you have any questions, please do not hesitate to contact us.

    Regards,
    Kiril Nikolov
    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