Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Cristina on Mar 25, 2009 02:19
open dhtmlx forum
Grid xml rowspan color

Hi,
in Grid I have created, using xml, the header of my table as two rows. I'd like to color both rows.
My code:
String colorHead="";
String attachHeader="";
xmlReturn.append("<?xml version='1.0' encoding='UTF-8'?>");
xmlReturn.append(" <rows>");
xmlReturn.append(" <head> ");
xmlReturn.append(" <column width='25' type='ro' align='center' color='#FFFFFF' sort='na'></column>");
...
while(results.next()){

colorHead+="<call command=\"setHeaderColor\"><param>"+j+"</param><param>"+PROJECTCOLOR+"</param></call>";
xmlReturn.append("<column width='55' type='ro' align='center'>"+results.getString("PROJECTID")+"</column>");
attachHeader+=results.getString("PROJECTNAME").trim()+",";

}
}
....
xmlReturn.append("<afterInit>"+colorHead+"<call command=\"attachHeader\"><param>#rspan,"+attachHeader+"#rspan,#rspan,#rspan</param></call>"+colorHead+"</afterInit>");
.....

The first row is colored in correct way, the second no...
Please can you help me?
Thanks and best regards!

Answer posted by dhxSupport on Mar 25, 2009 03:28

Current version of dthmlxGrid doesn't support setting header color via xml.

You can set color for all header (not for the specific column) with css:

div.gridbox table.hdr td {

background-color: red;

}

If you have attached skin to the grid:

div.gridbox_skinName table.hdr td {

Answer posted by Cristina on Mar 25, 2009 03:30

OK! thanks a lot!

Cristina