473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

DetailsView ASP Control and an empty field not an empty record.

I have pasted code I have in an ASPx page and I want to know how to make it
not display a field that is empty.
There does not seem to be anything online (MSDN) that explains it.

Usually the alt phone number would be empty and I do not want it displayed

Any suggestions would be appreciated.

<asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True"
AutoGenerateRows="False"
BorderColor="#336666" BorderStyle="Double" BorderWidth="3px"
Width="400px"
CellPadding="4" DataSourceID="SqlDataSource1"
GridLines="Horizontal" Height="50px"
HorizontalAlign="Center">
<FooterStyle BackColor="White" ForeColor="#333333" />
<EditRowStyle BackColor="#CCCC99" Font-Bold="True" ForeColor="#333333"
/>
<RowStyle BackColor="#CCCC99" ForeColor="#333333" />
<PagerStyle BackColor="#CCCC99" ForeColor="#333333"
HorizontalAlign="Center" />
<Fields>
<asp:BoundField DataField="Pastor" HeaderText="Pastor"
SortExpression="Pastor" />
<asp:BoundField DataField="Address" HeaderText="Address"
SortExpression="Address" />
<asp:BoundField DataField="CityStateZip" HeaderText="City State Zip"
SortExpression="CityStateZip" />
<asp:BoundField DataField="Phone1" HeaderText="Phone"
SortExpression="Phone1" />
<asp:BoundField DataField="Phone2" HeaderText="Alt Phone"
SortExpression="Phone2" />
<asp:BoundField DataField="FirstService" HeaderText="First Service"
SortExpression="FirstService" />
<asp:BoundField DataField="SecService" HeaderText="Second Service"
SortExpression="SecService" />
<asp:BoundField DataField="ThirdService" HeaderText="Third Service"
SortExpression="ThirdService" />
<asp:BoundField DataField="FourthService" HeaderText="Fourth Service"
SortExpression="FourthService" />
<asp:BoundField DataField="FifthService" HeaderText="Fifth Service"
SortExpression="FifthService" />
</Fields>
<HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
</asp:DetailsView>

Thanks in advance
Darrin

Nov 9 '06 #1
0 1136

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TdarTdar | last post by:
HI, I have a asp 2.0 page that has a sqldatasource and a detailsview i have enabled the inserting updating deleting in the datasoure. I have a blank table that has no records. I run the page.. I...
1
by: Shawn Wildermuth | last post by:
I have a *single* SqlDataSource that loads up a single result set that I show in a GridView. In the GridView, i've added a "Select" button and handling the SelectedItem event. I also have a...
12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
3
by: stuart.d.jones | last post by:
Hi, I have a DetailsView control bound to a SqlDataSource. I've got everything working nearly as I want, but here's my problem. I have a table which has a Guid as a Primary Key, and a VarChar...
0
by: Seok Bee | last post by:
Dear Experts, In my web application, I have a Master/Detail display of records using Gridview and DetailsView controls. Whenever, I made a selection of a record from the Gridview control, the...
0
by: jeffmagill | last post by:
Hi Everybody, I'm really hoping that someone can help me out because I have spent too much time on this project already! Basically, I have a DetailsView that handles all the Edits for a...
1
by: JayD | last post by:
Here is the problem: Using asp.net 2.0 to create a web app with standard master table gridview and child detailsview with insert capability. SQL Server 2000 database on the backend. Using Visual...
2
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created...
5
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.