Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by pingo on Oct 24, 2008 03:59
open dhtmlx forum
About Grid :How to change font family and font size of a whole column

I am using dhtmlGrid,now I have a question about font family of column:
I want to set a column's font,the cells belongs to this column have the same font family, and it is different from other columns .but now I could not find how to do that.all cases is below :
1),the grid is loaded from a xml named A.xml .at this case ,how should I do?
2).the grid is iterated in the jsp file,how should I do ?
Answer posted by Support on Oct 24, 2008 04:03
There are two ways
a) define cpecific style in XML 
in HTML
<style>
     .my_column{ .. }
</style>
in XML
<row id="some">
  <cell>...</cell>
  <cell class="my_column">...</cell>
  <cell>...</cell>
  <cell>...</cell>
</row>


b) do the same but in js code

grid.attachEvent("onRowCreated",function(id){
    grid.cells(id,1).cell.className="my_column";
    return true;
});