Hi
How do i make the checkbox created using mygrid.setColTypes(“ch”) as invisible??ii want the checkbox to be hidden for few rows…how do i do this?
Thanks
You can specify different types for each cell, it can be defined directly in XML or by js command.
In js
mygrid.setColTypes(“ch”)
In XML
1
As result, cell in second row will be rendered as “ro” - empty cell.
This is not working.Am using js.So send me the js script if possible.
From js code, the same can be done as
grid.addRow(some_id,values);
grid.setCellExcellType(some_id,index,“ro”)
grid.cells(some_id,index).setValue("")
where index - index of column, where checkbox need to be hidden
Beware that setCellExcellType available only in pro edition of grid
I have the pro version but the second column in my grid is of type tree.Will this not work if its a tree grid?I tried the scripts mentioned but it does not seem to work in a tree grid.(Working perfectly otherwise)
In case of treegrid - the tree column is mandatory ( it is define structure of hierarchy ), while it technically possible to change its type as well - it may result in lost of hierarchy structure and not officially supported.
Usage of the same command, against any other column ( non-tree ) in treegrid may work the same as in plain grid.
If you are using command against some item in closed branch ( or in case of smart rendering ) it may be necessary to add one more command
grid.getRowById(some_id); //render row , if it not rendered yet
grid.setCellExcellType(some_id,index,“ro”)
grid.cells(some_id,index).setValue("")
An extract of my source:
mygrid2.addRow(‘1111’,[‘0’,’ 1111’,
’ TEST’],‘11’,null,“blank.gif”,true);
mygrid2.getRowById(‘1111’);
mygrid2.setCellExcellType(‘1111’,“0”,“ro”);
mygrid2.cells(‘1111’,0).setValue(’’);
mygrid2.setRowTextStyle(‘1111’,“height:18px”);
mygrid2.addRow(‘2222’,[‘0’,’ 2222’,’ CHILD’],‘12’,‘1111’,“blank.gif”,false);
mygrid2.setRowTextStyle(‘2222’,“height:18px”);
mygrid2.stopFastOperations();
Its setting properly in the source but its still displaying the checkbox in the first column for row id 1111.
I have added whatever you have asked me to add.But still not working,
Most probably issue caused by using “fast operation” extension.
Without it all works correctly - sample with same code an in you snippet - sent by email.
Thanks a lot.Its working fine if i remove the fast operations.