Hello
Is there any difference in colorizing subGrid’s?
I used “setRowTextStyle” in normal Grid’s and always works fine. I just want to mark the clicked row and set a value.
Here is m code:
Grid[2].attachEvent("onSubGridCreated", function(subGrid, rId, rInd){
subGrid.setImagePath("../dhtmlx/FilesManager/codebase/imgs/");
subGrid.setIconsPath("../dhtmlx/FilesManager/icons/grid/");
subGrid.setHeader(",,,<span style='position:relative; left:-6px;color:#900'>Datei</span>,<span style='padding-left:12px;color:#900'>Größe</span>,<span style='padding-left:26px;color:#900'>Typ</span>,<span style='color:#900'>Upload Datum</span>");
subGrid.attachHeader(",,,#text_filter,#numeric_filter,#select_filter,#text_filter");
subGrid.setColTypes("img,img,ro,ro,ro,ro,ro");
subGrid.setInitWidths("28,28,28,*,80,95,115");
subGrid.setColSorting("str,str,int,str,int,str,str");
subGrid.setColAlign("center,center,center,left,center,center,left");
subGrid.enableTooltips("false,false,false,true,false,false,false");
subGrid.enableRowsHover(true, 'grid_hover_sub');
subGrid.attachEvent("onRowSelect", function(id,cInd) {
var rId = subGrid.getRowIndex(id);
if (cInd == 1) {
var antwort = confirm("Achtung !\nDie Datei '"+id+"' wird unwiderruflich gelöscht !\n");
if (antwort) {
//deleteFileContent(id);
subGrid.cells(rId, 2).setValue('1');
subGrid.setRowTextStyle(rId,"background-color:#900");
}
} else {
showFileContent(id);
}
});
subGrid.attachEvent("onRowCreated", function(rId,rObj,rXml){ subGrid.cells(rId, 4).setValue(parseBytes(subGrid.cells(rId, 4).getValue())); });
subGrid.init();
subGrid.enableAlterCss("rows_even_sub", "rows_uneven_sub");
dhtmlxEvent(window, "resize", function(){ window.setTimeout(function(){ subGrid.callEvent("onGridReconstructed",[]); },200); });
return true;
});
Thank you