Hello,
i have a html table that I use the dhtmlx_grid to get the grid. That�s everthing fine, loading data from the html table, but there is something strange with the enableAltercss().
When I get at the jsp the grid doesnt appear with the css styles, but when i click in headers, the css styles works…
what should i do to make it load with the grid always ??
Could you please provide any kind of sample where we can reproduce this issue?
Ok, it´s very simple:
at the JSP page:
<c:if test="${not empty objects}">
<img src="<c:url value="/scripts/dhtmlxgrid/imgs/icons_books/books_cat.gif"/>" title=“Editar”/> | <fmt:message key=“global.label.nome”/> | <fmt:message key=“global.label.unidade”/> | <fmt:message key=“global.label.funcao”/> | <fmt:message key=“global.label.produto”/> |
<img src="<c:url value="/scripts/dhtmlxgrid/imgs/icons_books/books_cat.gif"/>" border=“0” title=“Editar”/> | ${list.nome} |
</c:if>
at the JS file:
function configGrid(tableName) {
tableName.setSkin(“xp”);
tableName.enableEditTabOnly(true);
tableName.setMultiselect(true);
tableName.enableMultiline(true);
tableName.setImagePath("…/scripts/dhtmlxgrid/imgs/");
tableName.enableTooltips(“true,true,true,true,true”);
//tableName.selectRow(0);
tableName.attachHeader("#rspan,#text_filter,#text_filter,#text_filter,#text_filter");
tableName.enableAlterCss(“uneven”,"");
tableName.enableRowsHover(true,‘grid_hover’)
tableName.setSizes();
}
Thanks!
To fix this issue you should call enableAlterCss() method before grid initialization:
<table name=“higieneTable” class=“dhtmlxGrid” gridWidth=“800px” gridHeight=“300px” onbeforeinit=“configGrid(higieneTable);” style=“display:none”>
Thanks! I had tried to execute just the enableAlterCss() ate onbeforeinit() but doesnt worked, but everything works!
I have another question, is not actually a problem cause probably i wont need to use this for now, but is something interesting to discover the solution, here we go:
at this point… if i do this :
<s:iterator value=“objects” id=“list”>
this makes the ${list.nome} result a link… ok, that´s fine. But if I use head filter, when i put some character there, it filters everything inside the
if i digit “higieneOcupacional” the head filter find this as it had been written at the rows…
thanks!!
Another little issue:
I´m trying to change the selected row background color of my grid, my code at JSP is:
div.gridbox_xp table.obj tr.rowselected td.cellselected, div.gridbox table.obj td.cellselected {
background-color:#4682B4;
}
div.gridbox_xp table.obj tr.rowselected td {
background-color:#4682B4;
color:black;
}
But it´s not overriding the original css file… i can see at firebug…
what should i do ?
thanks!!
if i digit “higieneOcupacional” the head filter find this as it had been written at the rows…
Please check this article dhtmlx.com/docs/products/kb/inde … ter%20link
>>But it´s not overriding the original css file… i can see at firebug…
Unfortunately we cannot reproduce is. Style of the selected row and cell has allways the highest priority.