动态创建dataTables & grid设置列的label都是在column上操作,但是两个用的属性名不一样
dataTables用的是title,grid的用的是label
1.动态创建dataTables

	// 引用dataTables.js
	var dataTables = require("$UI/system/components/justep/dataTables/dataTables");
	
	Model.prototype.button4Click = function(event) {
		var parentNode = this.getElementByXid("content2");
		var option = {
			parentNode : parentNode,
			// dataTables的属性,设计时有的属性都可以设置
			data : "data1",
			class : 'table table-hover table-striped',
			flexibleWidth : true,
			multiSelect : true,
			responsive : false,
			// 列定义
			columns : [{
				sName : "fName",
				xid : "column1",
				title : "名称"
			}, {
				sName : "fCode",
				xid : "column2",
				title : "编码"
			} ]
		};
		new dataTables(option);
	};

2.动态创建grid

//引用grid.js
 var Grid = require("$UI/system/components/justep/grid/grid");
  
 Model.prototype.button5Click = function(event) {
     var parentNode = this.getElementByXid("content2");
      var option = {
     parentNode : parentNode,
     //grid的属性,设计时有的属性都可以设置
     data : "data1",
     xid : "gridMain",
     width: '100%',
     height:'auto',
     // 列定义
     colModel : [ {
             name : "fName",
             xid : "column1",
             label : "名称"       
         }, {
             name : "fCode",
             xid : "column2",
             label : "编码"
         }]
 };
         new Grid(option);
     }
 };