Book Image

Instant Kendo UI Grid

By : James R. Lamar
Book Image

Instant Kendo UI Grid

By: James R. Lamar

Overview of this book

<p>Kendo grids are the perfect fit if you need a powerful set of tools to let users manipulate data, or even if you just want a great way to dress up existing tables.</p> <p>Instant Kendo UI Grid is a practical, hands-on guide that will provide dozens of working examples and also serve as a reference for customizing your grids in no time. It will teach you to create detailed and beautiful grids. This book takes you through the many options and variations of using Kendo UI grids. The readers will end up being comfortable implementing grids in any relevant situation.</p> <p>You will learn about how to develop elaborate grids to handle any CRUD (Create, Read, Update, Delete) operation in a way that is easily maintained and even easier to develop. Styling is a breeze with Kendo UI themes, which also happens to include a theme to match the ever popular Twitter Bootstrap.</p> <p>Instant Kendo UI Grid is your go-to reference for creating amazingly beautiful and highly functional grids for tabular data.</p>
Table of Contents (7 chapters)

How to change your theme (Simple)


This recipe demonstrates how to change your Kendo theme.

Getting ready

Reopen the same file you used or created from the 1-initializing.html exercise file. In this recipe, you'll be making a simple change to realize how easy it is to change the theme of your grid.

How to do it...

In the <head> section of your document, change the reference to kendo.default.min.css to any of the other themes included in the style folder with your Kendo download. The following is an example that should be easy to see once you save your changes and refresh the page in the browser:

<!DOCTYPE html>
<html>
<head>
<title>Kendo UI Grid How-to</title>
<link rel="stylesheet" type="text/css" href="kendo/styles/kendo.common.min.css">
<link rel="stylesheet" type="text/css" href="kendo/styles/kendo.metro.min.css">
<script src="kendo/js/jquery.min.js"></script>
<script src="kendo/js/kendo.web.min.js"></script>
</head>

How it works...

Without referencing a Kendo theme stylesheet, your grid will essentially look like a plain table with borders. Kendo generates the same classes every time a grid is initialized, so the theme simply defines the style of those classes. If you look inside any particular theme folder, for example Metro, you'll notice that Kendo uses sprites to keep the file size and load time down.