DropDownList: Accesing the columns values

W

WhiskeyRomeo

I have a ddl bound to a sqldatasource which returns 4 columns. It is easy to
access two of them since one serves as the datavaluefield and the other as
the datatextfield. But how do I access the other columns' values in the
selecteditem of the ddl?

I was expecting to see something like this:

ddl1.selecteditem.columns("whatevercolumnIwant").value but, of course, that
does not exist.

Any help is appreciated.

WR
 
W

WhiskeyRomeo

David,

Thank you for the reply.

The dropdown list is actually a list of available appointments retrieved via
a stored procedure:

SELECT Cast(Cast(DayDT as Varchar(11)) + ' ' + StartTime12 AS DateTime) AS
APPT, DayDT, StartTime24, StartTime12
FROM tblOrgTimeSlot
WHERE (Org_ID = @Org_ID)AND(Taken < Capacity)
ORDER BY DayDT, StartTime24

So APPT is the datavaluefield and datatextfield. So an item looks like

9/30/2007 9:00 AM, 9/25/2007, 0900, 8:00 AM

The customer only sees first column and the first column is what makes each
item unique. But rather than string manipulate the Appt back into it parts I
just want the StartTime24 and DayDT value.

I can do this via a Infragistic combobox or I can use a dataset as the
dataource. I was just hoping I could do this using the MS standard ddl.

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top