Re: disapearing gridlines in gridview
- From: "Ray Costanzo" <my first name at lane 34 dot commercial>
- Date: Thu, 26 Apr 2007 14:05:33 -0400
That's how the browser renders a <td> that has no content. Often, an nbsp; is put in such a TD to get it to render the way you want it. So, depending on how you get your data or how you want to do it, you may want to consider replacing empty values with .
Notice what happens if you add this:
<style type="text/css">
table.Vinki td { height: 3em; border: 1px solid #000000; }
</style>
And give your GridView a CssClass="Vinki" property. Load this in IE and then in Firefox. It's all in how each browser decides to deal with things, and it's a pita!
Ray at work
"Vinki" <Vinki@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:AFABB5C2-8562-4602-A702-4BFC0599BB15@xxxxxxxxxxxxxxxx
Hello Everyone,
I have a gridview. I am using template columns inside the gridview.
When I display the gridview on the web page and if there is no value in a
particular cell, gridline disappaers around that cell.I want the grid lines
to appear all the time even if the cell is empty. Can anyone tell me what am
I doing wrong. Below is my gridview. I am showing only one template column. I
have around 14 template column in the gridview.
<asp:GridView ID="dgAgentActivity" runat="server"
AutoGenerateColumns="false" CellPadding="0" CellSpacing="1"
BackColor="AliceBlue" OnRowCreated="dgAgentActivity_RowCreated"
ShowFooter="true" >
<Columns>
<asp:templatefield headertext="SwitchTime" >
<itemtemplate>
<%#Eval("SwitchTime")%>
</itemtemplate>
<footertemplate>
<asp:label id="SwitchTime" runat="server"/>
</footertemplate>
</asp:templatefield>
<columns>
Thanks.
.
- Follow-Ups:
- Re: disapearing gridlines in gridview
- From: Vinki
- Re: disapearing gridlines in gridview
- Prev by Date: Re: Findcontrol in Gridview Footer row not working
- Next by Date: Re: Why can't I set the listbox selectedIndex to -1?
- Previous by thread: Question about ASP.NET threads: nuts & bolts
- Next by thread: Re: disapearing gridlines in gridview
- Index(es):
Relevant Pages
|