473,394 Members | 1,694 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,394 software developers and data experts.

SelectedItem after DataBinding--get DataRow?

If I databind a DataTable to a dropdown list in Winforms, the SelectedItem
is actually the entire DataRow from the datatable. If I want to access
columns that were not part of the display, I can do that.

It doesn't look like I can do that in ASP.NET. After databinding, the
SelectedItem appears to be the display string only.

Is this impression correct? Is there any way to get back the rest of the
datarow via the databound control?

(Obviously I can stick the whole DataTable in ViewState or something like
that, that's not what I'm asking.)

Matt
Jun 23 '06 #1
0 1000

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hein Albrecht | last post by:
'ello How can I get the DataRow of the DataGrid's SelectedItem for the bound DataView's DataTable? Thanx Hein
1
by: MrNobody | last post by:
I seem to be having trouble trying to select the right value in a ComboBox DataSourced by a DataTable with a value for a DataRow... For example... In a Windows Form, I have a ComboBox: ...
0
by: huobazi | last post by:
I have many dropdownlist controls in my ascx (and use LoadControl in a aspx fiel) file,so i write a method "InitList(DropDownList list,string strsql,string TextField,string ValueField)" but when i...
4
by: Martyn Fewtrell | last post by:
I want to update a database record with a number of fields - doesn't sound to difficult at this stage! I have a system to select the correct record from the database and load the data into a...
4
by: darrel | last post by:
what is the difference between these? I always end up typing 'selectedvalue' only to have problems and then realize I meant to use selecteditem.value (the value of the selected item). When would...
8
by: Raoul Watson | last post by:
Is there a way to simulate a selection (let's say to the third item on the list) and cause the highlight to appear? Any ideas welcomed and appreciated. Thanks!
1
by: RSH | last post by:
Hi, I am experimenting with the Viewstate and based on a few articles I have read, I put together a test. it is a simple test where I am dynamically creating a DropDownList that contains 25000...
2
by: Tracey | last post by:
How can I convert to a string (what I thought was a string)? and/or How can I assign the value of a selected item in a list box to Label1.Text? using VB in VS2005. Thanks, Tracey I completed...
3
by: Jerry | last post by:
Hi I have a combo box that is populated by an ole db connection to a ms access table (Valuewave). The column that is used in the table is called waves. The combo box is populated with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.