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 Grid view and displaying tabular data


A Grid in Kendo UI can be created in the following two ways:

  • From an existing HTML table element

  • From an existing DIV element

In this recipe, we will take a look at the first approach, that is, creating a Grid using an existing HTML table element.

How to do it…

Creating a Grid using an existing table element is very easy. Let's create a table with five rows using the following code snippet:

<table id="grid">
  <thead>
    <tr>
      <th>Employee ID</th>
      <th>Full Name</th>
      <th>Year of Joining</th>
      <th>Designation</th>
      <th>Extension No.</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>10001</td>
      <td>Sagar H Ganatra</td>
      <td>2008</td>
      <td>Software Architect</td>
      <td>49523</td>
    </tr>
    <tr>
      <td>7008</td&gt...