Hi,
I am using the evaluation version and checking if I can convert the existing tables in my project to grids. I want the cells to be readonly and every column should be sortable too.
Given below is the code I have used.
var mygrid= new dhtmlXGridFromTable(‘scrollTableDhtmlxGrid’);
mygrid.setInitWidthsP(“11,11,10,11,12,10,11,12,12”);
mygrid.setColTypes(“ro”,“ro”,“ro”,“ro”,“ro”,“ro”,“ro”,“ro”,“ro”);
mygrid.setColSorting(“date”,“int”,“int”,“text”,“text”,“text”,“text”,“text”,“text”);
mygrid.setColAlign(“center,right,right,center,center,center,center,left,left”);
mygrid.enableAutoWidth(true);
mygrid.enableRowsHover(true,“grid_hover”);
mygrid.enableAlterCss(“even_row”,“odd_row”);
Sorting works if I dont use setColTypes and setColSorting. If I specify these, it doesnt work. Also, if I dont specity any colType, the cell is editable and when I double click it, the entire div is displayed and not just the value.
Any help is appreciated. I am trying to check if I can use the grid to implement what we currently have and then order the professional version.
Thanks in advance!