[eluser]Unknown[/eluser]
Hi guys,
paulopmx, your flexigrid is great!
But I have one question about it. I want to make an automatic grabbing of column names from the database and create a loop in colModel, but I'm not sure how to insert the data to colModel:[].
For example:
Code:
function get_column_names(){
var col_mod = Array();
for(var i=0; i<cols_arr.length; i++){
col_mod[i] = '{display: \''+cols_arr[i]+'\', name : \''+cols_arr[i]+'\', width : 40, sortable : true, align: \'center\'}';
}
return col_mod;
}
My question is, how to insert an array col_mod to colModel:[]?