473,394 Members | 1,371 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,394 software developers and data experts.

DataList Empty Values

I have the following problem. I just learned how to use datalist with repeatcolumns. The thing is that when i fill the Datalist with information from the DB there are some columns that dont have values in some rows, but do in others .. for example a second phone number. How can i show the label for that second phone number depending if there is number or not . for example:

Company x
phone1 : 555-45612
Phone2: 123-456

Company y
Phone1 : 555-654987

Compaby w
Phone1: 123-456789
Phone2: 123-458755

The problem the way i see it is the template.. its always hardcoded i thought it would be an easy If container.DataItem(column) is not null then show the phone2 label but i cant seem to do it
Im using VB.net
Jul 6 '07 #1
0 997

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Kevin | last post by:
Hi all, I'm now very frustrated, I've been battling all of today to try and understand the datalist, editing, inserting, updating, etc, I have managed to get most of that sort of stuff...
2
by: Todd | last post by:
I am somewhat new to ASP.NET and I am probably overlooking some basic rule that's causing my error. Anyways, here's the scoop: I am using a DataReader to access a SQL stored procedure. I want...
6
by: Thanh | last post by:
I created an ASP.NET project and dropped a DataList on the web form. I then wrote a simple class to return data: namespace Playing { public class PositionData { private string name; private...
1
by: j_ruez | last post by:
I have looked everywhere and honestly can't believe I am the only one trying to figure this out. Maybe I am searching under the wrong keywords. I have a datalist. It is bound to an array, but...
8
by: MattB | last post by:
I think I'm close to making this work, but so far it does not. I have a datalist (id = "dlVFields") on a web form that has an item template with a textbox in it. The textbox id = "txtVerify"....
2
by: Olav Tollefsen | last post by:
I have a Web Form with a DataList. Inside the ItemTemplate, I have a DropDownList control. <asp:DataList ID="ProductDataList" Runat="server"> <ItemTemplate> <asp:DropDownList ID="DropDownList1"...
0
by: bryanp10 | last post by:
I have a DataList on my page which contains multiple DropDownLists. My page defaults to showing six rows in the DataList. I want the ability to dynamically add rows if needed. Right now I'm just...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
4
by: rn5a | last post by:
A DataList displays 3 columns - Product, Category & Price. These columns are populated with records from a SQL Server 2005 DB table. Apart from the above 3 DB columns that the resultset retrieves,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.