Hi Group,
I am having a problem with datagird and combox box.
Say for ex, I am populating datagrid with dataset that contains table
name "Orders". This table contains one column by name "CustomerName".
I am having one more dataset say "Customers" and I populate the combo
box with the Customer information. DisplayMember is "CustomerName" and
ValueMember is "CustomerId".
Now, when I select a row in datagrid, which contains CustomerName as
"Bill", then the selected index in ComboBox control has to be changed
to "Bill".
How to accomplish this.
Note: ComboBox is not part of DataGrid Control
Sijin Joseph - 18 Oct 2004 05:15 GMT
Hi Prem,
It would have been easier if both tables had been in the same dataset.
Then you could have set a DataRelation between them and got the desired
effect very easily.
Take a look at these two threads for more info on this topic.
http://groups.google.com/groups?hl=en&lr=&client=firefox-a&threadm=ehHPSWjmEHA.1
712%40TK2MSFTNGP09.phx.gbl&rnum=2&prev=/groups%3Fq%3Dlookup%2520table%2520.net%2
520sijin%2520joseph%26hl%3Den%26lr%3D%26client%3Dfirefox-a%26sa%3DN%26tab%3Dwg
http://groups.google.com/groups?hl=en&lr=&client=firefox-a&threadm=Ok3cXJ%23nEHA
.536%40TK2MSFTNGP11.phx.gbl&rnum=4&prev=/groups%3Fq%3Dlookup%2520table%2520.net%
2520sijin%2520joseph%26hl%3Den%26lr%3D%26client%3Dfirefox-a%26sa%3DN%26tab%3Dwg
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
> Hi Group,
>
[quoted text clipped - 14 lines]
>
> Note: ComboBox is not part of DataGrid Control
Tony Santolaria - 18 Oct 2004 08:13 GMT
Set the property "Text" of the combobox to the Orders - CustomerName column,
> Hi Group,
>
[quoted text clipped - 14 lines]
>
> Note: ComboBox is not part of DataGrid Control