DropDownList databind

S

stefano mostarda

Hi there,

I have a problem.

I have a table in a cached dataset. Depending on the page I need to get a
specific set of rows from the table and bind them to a dropdownlist.

To get the rows from the table I use the Select method, but, how can I bind
the (DataRow[]) rows to the ddl?

Have I to do it manually?

Thanks in advance
Stefano Mostarda
Rome Italy
 
C

Cowboy \(Gregory A. Beamer\)

Add a DataView on the DataTable that filters the rows. You will have to have
some value that you can filter on in the DataTable to do this.

Example:
Imagine a DataTable like this.

DataID URL Section
1 default.aspx 1
2 2/default.aspx 2

You can then filter the view on Section to get links for the DataList. You
would bind the URL to the hyperlink in the list in this example.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top