dropdownlist control-urgent

  • Thread starter Thread starter reiks
  • Start date Start date
R

reiks

I have a dropdownlist control . I want to bind the data to
it from an existing datagrid on my page i.e I wnat to
specify the datagrid name instead of the datatable name.


Is it possible? How can I bind data from a datagrid to
ddlistbox?
 
You can create an array of DataGrid names, or similar, and bind to the
DropDownList, if this is what you are aiming at. You can also
programatically add items. If you are, instead, trying to bind specific
columns from the DataGrid, you are pretty much toast, as DataGrids are not
data sources. Since you say you want the DataGrid name, you are in luck.

Here are some sources:

1. Great info on a variety of binding topics
http://builder.com.com/5100-6387-1058862.html

2. Programatically adding items
http://www.codeproject.com/aspnet/xmlboundlistcontrol.asp - ListBox control,
but you can adapt easily.

3. Advanced data binding (variety of binding topics)
http://www.devx.com/dotnet/Article/17746?trk=DXRSS_DOTNET


--
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

Back
Top