Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ever on Jun 08, 2009 18:22
open dhtmlx forum
Displaying grid created from HTML Table

Hi there,

For big HTML tables, when I use the approach of creating the grid from HTML table, the browser shows the plain vanilla HTML table first while it's downloading the rest of the page before it switches to the "pretty" grid. Is there a way to suppress the display of the plain vanilla table? I tried setting the display to "none" but that resulted to an empty grid.

Thanks in advance.
Ever
Answer posted by dhxSupport on Jun 09, 2009 08:24
>>I tried setting the display to "none" but that resulted to an empty grid.
You should set width and height to the grid using "width" and "height" attributes:
<table class="dhtmlxGrid" name="mygrid" imgpath="../codebase/imgs/" width="400px" height="300px" style="display: none">
...
</table>
Answer posted by Ever on Jun 09, 2009 12:49

Thanks.  It works on FF.  But on IE (7), I get the following error:

Line: 71, Char: 69:  Invalid argument

IE works only if I take out "display:none" but even then, it ignores the width and height that I set.  Same thing with FF.  If I take out "display:none", the width and height are ignored.  But like I said, FF works well with "display:none" and it sets the width and height accordingly when it is present.

I attached one of the files I'm testing with.  Please test this on IE.

Thanks,

Ever

Attachments (1)
sample2.html685.00 B
Answer posted by Ever on Jun 09, 2009 12:51

Oops, ignore that attachment.  It had "visibility" instead of "display" because I was desperately trying all sorts of things.  Here is the correct one.

Thanks!

Attachments (1)
sample2.html682.00 B
Answer posted by Ever on Jun 09, 2009 19:10

I've figured it out.  Actually, I found it in the KB.  I have to set the column widths (at least in the header row, from what I see), i.e. <td width="some number">.  It's strange because I thought I saw it work the other day on IE without those.

Answer posted by Support on Jun 10, 2009 03:58
Normally it takes the width from rendered columns, but when table has display:none assigned - column's size can't be detected ( display:none nullify all sizes in related content ) , so it need to be specified directly.