Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Datagrid
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Biddyman
Starting Member

32 Posts

Posted - 18 January 2008 :  21:52:11  Show Profile  Visit Biddyman's Homepage  Send Biddyman a Yahoo! Message
What am I missing? If I have a Null field in a recordset, the border does not fill around the cell in the table. Can I do anything? I'm using this code:

<table border="1" width="100%">
<%do until rs.EOF%>
    <tr>
    <%for each x in rs.Fields%>
       <td><%Response.Write(x.value)%></td>
    <%next
    rs.MoveNext%>
    </tr>
<%loop
rs.close
conn.close
%>
</table>

phy1729
Average Member

USA
589 Posts

Posted - 18 January 2008 :  22:47:55  Show Profile
Have you tried putting the border on the container of the table?
Go to Top of Page

Biddyman
Starting Member

32 Posts

Posted - 18 January 2008 :  23:07:01  Show Profile  Visit Biddyman's Homepage  Send Biddyman a Yahoo! Message
Not sure what you mean.
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 18 January 2008 :  23:19:22  Show Profile
If the table is in a div would it work if the border is for the div ex
<div style="border:1px"><table>.
<tr>...</tr>
...
</table></div>
You could just add the div if it's not there. Yes I prefer CSS.
Go to Top of Page

Biddyman
Starting Member

32 Posts

Posted - 18 January 2008 :  23:59:43  Show Profile  Visit Biddyman's Homepage  Send Biddyman a Yahoo! Message
That made the borders disappear all together. Its just around the null fields that the border doesn't show.
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 19 January 2008 :  00:02:15  Show Profile
Oh that border. Have you tried:

<table width="100%">
<%do until rs.EOF%>
    <tr>
    <%for each x in rs.Fields%>
       <td border="1"><%Response.Write(x.value)%></td>
    <%next
    rs.MoveNext%>
    </tr>
<%loop
rs.close
conn.close
%>
</table>
Go to Top of Page

Biddyman
Starting Member

32 Posts

Posted - 19 January 2008 :  00:06:52  Show Profile  Visit Biddyman's Homepage  Send Biddyman a Yahoo! Message
The same. Oh well.
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 19 January 2008 :  00:31:57  Show Profile
What browser and what is the HTML output?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 19 January 2008 :  04:08:39  Show Profile  Visit HuwR's Homepage
you need to do something like this, table cells do not draw correctly if they are empty.

<% if(x.value <> NULL) then Response.Write(x.value) else Response.Write("&nbsp;") %>

Go to Top of Page

Biddyman
Starting Member

32 Posts

Posted - 19 January 2008 :  10:57:36  Show Profile  Visit Biddyman's Homepage  Send Biddyman a Yahoo! Message
Thanks HuwR, I thought it was something like that.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07