Button Not Showing After ListView

4 posts, 0 answers
  1. Eric
    Eric avatar
    2 posts
    Member since:
    Dec 2012

    Posted 15 Jul 2013 Link to this post

    I have created a list view and when you click on one of the objects it opens a further details page.
    This works ok except that the button on the details page is only showing text.
    The following is an example so if you click on one of the objects in the list view the next page the word Website should be a button.
    http://jsbin.com/edaciy/1
    The following is the code
    http://jsbin.com/edaciy/1/edit
    Thanks.
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 16 Jul 2013 Link to this post

    Hi,

    The widgets in the template should be initialized after being rendered - please take a look at this documentation article.

    Regards,
    Petyo
    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. Eric
    Eric avatar
    2 posts
    Member since:
    Dec 2012

    Posted 16 Jul 2013 Link to this post

    Hi,
    I have tried adding kendo.init($("#loadModuleDetails"));
    I am a little unsure of when the init should be called you mentioned after rendering.
    I added kendo.init($("#loadModuleDetails")); after the template similar to the example of the page you gave me. Still no luck
    I add kendo.init($("#loadModuleDetails")); to the end of the loadDetails function still no luck.
      function loadDetails(guid)
      {
        var raw = dataSource.data();
        var length = raw.length;
        var selected;
        for (var i = 0; i < length; i++)
        {
          if (dataSource.at(i).guid == guid)
            selected = dataSource.at(i);
          }
        var template = kendo.template($("#module-details-template").html());
        if(selected !== undefined)
        {
          $("#loadModuleDetails").html(template(selected));
          kendo.init($("#loadModuleDetails")); 
         }
      }
    I do understand that I need to init the widgets I am just a little unsure where.
    Regards 
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 17 Jul 2013 Link to this post

    Hi Eric,

    The basic principle when creating an application using Kendo UI Mobile is to first write the markup of the widgets that will be later used when the application is initialized. When all the markup is written you can initialize the widgets and the mobile application. So the basic structure of your application, should be something like this:


    <body>
     
        <!--Markup of the widgets that will be later initialized-->
     
    <script>
        var app = new kendo.mobile.Application(document.body);
    </script>
    </body>
    </html>


    You can also check the Kendo UI Mobile demos and check their source code on the following link:

    http://demos.kendoui.com/
     
    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