function exportExecl(obj) {
var cfs = $(obj).datagrid('getColumnFields'); //这是获取到所有的Fields
//得到title名
var colName = [];
for (i = 0; i < cfs.length; i++) {
var col = $(obj).datagrid("getColumnOption", cfs[i]);
colName.push(col.title);//把TITLEPUSH到数组里去
}
console.log(colName);
}
05-11 03:40