473,406 Members | 2,312 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,406 software developers and data experts.

dumping dropdownlist.datasource to datatable

pod
298 100+
Assigning a datatable to DropDownList.DataSource is easy:

Expand|Select|Wrap|Line Numbers
  1. DropDownList1.DataSource = Datatable1
My question is "Is it possible to do the reverse? ...i.e. fill in a datatable with the content of a DropDownList.DataSource

(I tried the follwing code and it does not work but am looking for another way of doing this)
Expand|Select|Wrap|Line Numbers
  1.  Datatable1= DropDownList1.DataSource


The reason I ask is I have a ASP.NET WebForm (VB) which contains a ListView with datasources for DropDownLists. The whole process works best when datasources are set using datatable. Using regular DropDownLists, this works very well.

My problem is that I want to use an improved version of the DropDownList control : DropDownListX which can be found in the following link:
http://ignatu.co.uk/articles/Adding_...trol/#section3

This article shows how to programmatically build the DropDownList item list, ... and it gets complicated when trying to databound the DropDownLists in every ListView events.

So my question is
"Is it possible to fill in a datatable with the content of a DropDownList.DataSource"

Or if someone has found a way to use DropDownListX control in a ListView, please show me your code


Thank you for any comments



P:oD
Feb 26 '13 #1
0 1211

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

Similar topics

1
by: Sean | last post by:
Hi, I have an ASPX Dropdown list. I am unsure how to set my datasource. I have a table that has 2 columns, an identity column and a description column. Has anyone got some sample code on...
12
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option...
0
by: VB Programmer | last post by:
I have a DataGrid with a dropdownlist in one of the columns (it's a TemplateColumn). How do I set the ddl's datasource dynamically via code? I'm having trouble knowing how to reference the ddl. ...
0
by: gane kol | last post by:
How to call an xslt extension object for asp:dropdownlist datasource
2
by: Marc Robitaille | last post by:
Hello, I set the DataSource property of a DropDownList to as DataSet that is filled from a SQLDataAdapter. The AutoPostBack property of that DropDownList is set to True. When the...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
2
by: Zorpiedoman | last post by:
Ok, I have a DataTable: ID Name -- ------------ 1 John 2 Jacob 3 Jingleheimer 4 Schmidt 5 John
0
by: dawg1998 | last post by:
I am able to populate a DropDownList control within multiple rows of a GridView with the following code: `````````````````````````````````````````````````````` <asp:GridView id="gvGridView"...
1
by: jkeel | last post by:
I have two ddl's in a formview which is bound to an objectdatasource. Each of the ddl's have there datasource propertys set to a function which returns a dataset. The selected index of each of...
3
by: itboy1 | last post by:
hii i m making a page where i have used Dropdownlist and in that i have put 2 drop down list (1) Year( 2)month so in datatable i want a liek if u have 1 year and 3 month . i want it like that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.