Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Prasad on Apr 15, 2008 06:13
open dhtmlx forum
Blank Header cell

Hi

I have attach headers in my grid.
The attach header cell may have data or not.
I noticed that when Header cell data is blank(""), The header cell looks differently than other header cells.
how to resolve?

Answer posted by Support on Apr 15, 2008 07:43
The browser may render empty cell different from not-empty.
You can try resolve problem by adding next rule to css class of header

dhtmlxgrid.css
div.gridbox table.hdr td {
    ...
    empty-cells:show;

But it will not work for all browsers, usage of   instead of empty value will resolve issue for sure.

Answer posted on Apr 15, 2008 09:27
Hi
I tried both soln
1. empty-cells:show;
   
I tested in FF its working. But when there is not any Header cell data for particular header Row, The header Row size decreases.
    I want to take care for FF and IE only.
   Will it work for IE too?

2.usage of   instead of empty value
Here I am getting JS error.

  top[0] has no properties
var pid=(top[0].getAttribute("parent")||0);

Here is my XML
<beforeInit>
<call command='attachHeader'>
<param>HA,&nbsp;,HeaderB,&nbsp;</param>
</call>
</beforeInit>
What is going wrong?

Answer posted by Support on Apr 16, 2008 01:36
>>  Will it work for IE too?
It will not work in IE6 for sure

>><param>HA,&nbsp;,HeaderB,&nbsp;</param>
XML requires that & character must be replaced with &amp; , so the correct line will be

    <param>HA,&amp;nbsp;,HeaderB,&amp;nbsp;</param>

kind of ugly, but it will work