By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,669 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

dropdownlist control-urgent

P: n/a


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?
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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/xm...istcontrol.asp - ListBox control,
but you can adapt easily.

3. Advanced data binding (variety of binding topics)
http://www.devx.com/dotnet/Article/1...k=DXRSS_DOTNET
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"reiks" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...


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?

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.