DHTMLX Front-end framework build one of your application Tutorials (v)--Add a grid of tables

Source: Internet
Author: User

Table examples

The sample is as follows:

  

Our introduction to this article is the Dhtmlxgrid component. It supports 4 kinds of data formats: XML, JSON, CSV, Jsarray.

To add a table to a cell in the layout:

  

1. Use the Attachgrid () method to add the table to the cell in the layout.

  

var new Dhtmlxlayoutobject (document.body, "2U"var contactsgrid = Layout.cells ("a"). Attachgrid ();

2. Continue adding code to initialize the Gird settings:

  

Contactsgrid.setheader ("Name,last name,email");   // sets the headers of columnscontactsgrid.setcolumnids ("Fname,lname,email");         // sets the columns ' IDscontactsgrid.setinitwidths ("250,250,*");   // sets the initial widths of columnscontactsgrid.setcolalign ("Left,left,left");     // sets the alignment of columnscontactsgrid.setcoltypes ("Ro,ro,ro");               // sets the types of columnscontactsgrid.setcolsorting ("Str,str,str");  // sets the sorting types of columns

3. Initialize the table with the Init () method

  

Contactsgrid.init ();

  

DHTMLX Front-end framework build one of your application Tutorials (v)--Add a grid of tables

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.