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

Button Not Showing After ListView

3 Answers 103 Views
Button (Mobile)
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 16 Jul 2013, 03:08 AM
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.

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 16 Jul 2013, 05:38 AM
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!
0
Eric
Top achievements
Rank 1
answered on 16 Jul 2013, 09:07 PM
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 
0
Kiril Nikolov
Telerik team
answered on 17 Jul 2013, 08:45 AM
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!
Tags
Button (Mobile)
Asked by
Eric
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Eric
Top achievements
Rank 1
Kiril Nikolov
Telerik team
Share this question
or