Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > disappearing gridlines in gridview

Reply
Thread Tools

disappearing gridlines in gridview

 
 
Vinki
Guest
Posts: n/a
 
      04-26-2007
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.

 
Reply With Quote
 
 
 
 
KyleK
Guest
Posts: n/a
 
      05-17-2007
Use <EmptyItemTemplate>. You might have to put a space in it

Hope this helps

--
Kyle Kelin
..NET Developer
www.dotnetmafia.com


"Vinki" wrote:

> 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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview Gridlines color tshad ASP .Net 2 01-20-2010 05:43 PM
disapearing gridlines in gridview =?Utf-8?B?Vmlua2k=?= ASP .Net 4 04-27-2007 02:28 PM
GridView Gridlines Mike P ASP .Net 2 04-26-2006 12:28 PM
GridView -> Excel = no gridlines Magnus Blomberg ASP .Net Datagrid Control 0 10-21-2005 04:33 PM
Hiding Gridlines of a word document Shreyas Madwanna ASP .Net 0 01-21-2004 03:04 PM



Advertisments