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

binding datacolumn to another datacolumn in a datagrid

i have a datatable 'Users' with two columns:
'FriendlyName'
'UserName'

i have a datagrid with two columns that I want to bind with the
'Authors' table:

'FriendlyName' : ComboBox column populated from another datatable with
two columns (DisplayMember = 'Name' which holds a FriendlyName and
ValueMember = 'ID' which holds a UserName)

'UserName' : TextBox column to be populated (readonly) from the 'ID'
(ValueMember') of the currently selected 'FriendlyName'
(DisplayedMember)

The idea is that when you select a friendly name from the ComboBox, the
'Author' table then holds that name in 'FriendlyName' and the
corresponding 'UserName'.

I have the combobox column working and both column in the grid that are
binding, but how do I bind the 'ValueMember' of the current combobox to
the second column which is also bound to the 'UserName' column of the
original 'Authors' table?

Nov 23 '05 #1
0 1008

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

Similar topics

5
by: Dalibor Kusic | last post by:
The DataTable contains, for example, only one column of lets say Person class. Person class has three fields, and a constructor that takes a single string and parses it over those three fields. ...
0
by: brian | last post by:
Can you bind a datarelation to a datagrid? I posted my code below. I built a datarelation with "Users" as parent and "Computer" as child to create a table called "Info" in dataset "ds". I...
1
by: epigram | last post by:
Well, conceptually this is what I want to do. I was hoping to use an ArrayList to build a (dynamic) array of string arrays, and then bind the ArrayList object to a DataGrid. I can do that, but it...
1
by: Demetri | last post by:
Someone posted the following back in June and I am now doing the same thing. I'll just paste what was asked and see if anyone can give us an answer: ...
2
by: ¿ Mahesh Kumar | last post by:
- I have created a datatable as mydatatable and pointed that table to gridview...AM I CORRECT below.. --------------------------------- DataTable myDatatable=new DataTable("ParentTable"); ...
0
by: mark | last post by:
What I have is three forms. Form one with buttons 1, 2 and 3; and forms 2 and 3 with datagrids. Button 1 populates arrays a(i,j) and b(i,j) with values. Button 2 creates a datatable containing...
4
by: bordsby | last post by:
Situation: I am using an OleDbDataAdapter to fill a DataSet's DataTable with data from an Access database. The DataSet's DataTable is bound to a DataGrid. After the OleDbDataAdapter.Fill method...
1
by: =?Utf-8?B?cGpzaW1vbg==?= | last post by:
I get the following error: Unhandled Exception, Log_Id does not belong to table Queue .... when I execute the following code ("dgQueue" is my datagrid control): Dim dtQueue As DataTable =...
3
by: RobertTheProgrammer | last post by:
Hi folks, I've got another problem. Basically, I'm trying to use a nested GridView, however the nexted GridView displays no values (even though in debug I'm getting valid values into my DataSet. ...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
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...

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.