Book Image

Learning DHTMLX Suite UI

By : Eli Geske
Book Image

Learning DHTMLX Suite UI

By: Eli Geske

Overview of this book

JavaScript applications provide an excellent user experience for small to large scale enterprise applications. The amazing growth of JavaScript has opened the door for many great libraries such as DHTMLX. "Learning DHTMLX Suite UI" will teach you how to use these libraries effectively so you can make presentations that will take your employer's/ client's breath away! "Learning DHTMLX Suite UI" is a step-by-step guide that will teach you the basics of DHTMLX library components and how to apply them in a real-world scenario. This book will start with the installation of DHTMLX before moving on to explore the features of DHTMLX and helping you to create your first user management application. "Learning DHTMLX Suite UI" will guide you through the installation of DHTMLX as a single-page application. As you progress from one chapter to the next, you will gradually build a simple user management application. You will also learn how to create forums with validation and how to use grids to add and edit users. The book will also suggest the best practices for using toolbars and refreshing data. With "Learning DHTMLX Suite UI Guide", you will be inspired to come up with your own great ideas for your future application development projects.
Table of Contents (17 chapters)
Learning DHTMLX Suite UI
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The grid methods and events


When creating a DHTMLX grid, we first create the object; second we add all the settings and then call a method to initialize it. After the grid is initialized data can then be added.

The order of steps to create a grid is as follows:

  1. Create the grid object

  2. Apply settings

  3. Initialize

  4. Add data

Now we will go over initializing a grid.

Initialization choices

We can initialize a DHTMLX grid in two ways, similar to the other DHTMLX objects. The first way is to attach it to a DOM element and the second way is to attach it to an existing DHTMLX layout cell or layout.

Note

A grid can be constructed by either passing in a JavaScript object with all the settings or built through individual methods.

Initialization on a DOM element

Let's attach the grid to a DOM element. First we must clear the page and add a div element using JavaScript.

Type and run the following code line in the developer tools console:

document.body.innerHTML = "<div id='myGridCont'></div>";

We just cleared...