首页 > 代码库 > easyui 动态列

easyui 动态列

$.post(‘${createLink(action:"build Columns url ")}‘, params, function(data){
var columns = [];
var col = [];
for(var i=0; i< data.length; i++){
var v = data;
var c = {title:v.title, field:v.field, width:90};
col.push(c);
}
columns[0] = col;
$(‘#datagrid‘).datagrid({columns:columns});
},"json");

easyui 动态列