Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DetailsView ASP Control and an empty field not an empty record.

Reply
Thread Tools

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

 
 
ButlerDJIAM
Guest
Posts: n/a
 
      11-09-2006
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.

<aspetailsView 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" />
</aspetailsView>

Thanks in advance
Darrin

 
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
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
Keeping text control characters (line breaks / carriage returns) in DetailsView field Bazza Formez ASP .Net 2 08-06-2007 08:53 PM
Empty Data in DetailsView, New link not showing wardemon ASP .Net 0 12-26-2006 05:39 PM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
DetailsView - Changing to Insert Mode (Not By Using the Insert Button In the DetailsView Control) Feege ASP .Net Web Controls 0 12-20-2005 12:28 AM



Advertisments