PC Review


Reply
Thread Tools Rate Thread

binding datacolumn to another datacolumn in a datagrid

 
 
bpdace
Guest
Posts: n/a
 
      23rd Nov 2005
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
datacolumn or dataview binding problem bilalso Microsoft C# .NET 1 23rd May 2006 03:10 PM
Bug in Framework 1.1 SP1 for DataColumn Expressions in a DataGrid Ellen Microsoft Dot NET Framework Forms 0 18th Nov 2004 06:32 PM
Not allow null in DataGrid bool DataColumn =?Utf-8?B?RXJpY2E=?= Microsoft Dot NET Framework Forms 3 15th Apr 2004 01:01 PM
disabling threestate of checkbox in datagrid (datacolumn) Steven Microsoft VB .NET 3 25th Feb 2004 08:45 PM
Why don't DataGrid Use DataColumn.Caption madhu Microsoft ADO .NET 0 8th Nov 2003 07:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:52 AM.