Book Image

Kendo UI Cookbook

By : Sagar Ganatra
Book Image

Kendo UI Cookbook

By: Sagar Ganatra

Overview of this book

Table of Contents (18 chapters)
Kendo UI Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a list using a ListView widget


The ListView widget allows you to display a list of items on the page. This list can be flat or grouped. The list values can be specified in the HTML markup, or the ListView widget can be bound to a DataSource object. In this recipe, we will take a look at creating a ListView widget where the list values are specified in the markup.

How to do it…

A ListView widget can be created using an unordered or ordered list. To create a ListView widget, assign the listview value to the data-role attribute:

<ul
  data-role="listview">

  <li>
    <a href="her.html">
      <img src="./images/her.jpg" />
      Her
    </a>
  </li>
  <li>
    <a href="gravity.html">
      <img src="./images/gravity.jpg" />
      
    </a>
  </li>
  <li>
    <a href="12_years_a_slave.html">
      <img src="./images/12_years_a_slave.jpg" />
      12 Years A Slave
    </a>
  </li>
  .
  .
 ...