Categories | Question details Back To List | ||
to make checkbox invisible 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 Answer posted by Support on May 13, 2008 09:32 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 <row id="1"><cell>1</cell></row> <row id="2"><cell type="ro"></cell></row> As result, cell in second row will be rendered as "ro" - empty cell. Answer posted on Jun 23, 2008 01:47 This is not working.Am using js.So send me the js script if possible. Answer posted by Support on Jun 23, 2008 01:49 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 Answer posted by ashwini on Jun 23, 2008 02:05 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) Answer posted by Support on Jun 23, 2008 02:18 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("") Answer posted by ashwini on Jun 23, 2008 02:38 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, Answer posted by Support on Jun 23, 2008 09:27 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. Answer posted by ashwini on Jun 23, 2008 21:24 Thanks a lot.Its working fine if i remove the fast operations. |