Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2006-05-14 : 21:01:51
|
I have two tables tbl1 and tbl2. Tbl1 is the datasource of mydataGrid. Tbl1 has 4 columns (all with mapping names from Tbl1).I want to add a combo box in the fifth column that has its values from Tbl2. Is that possible and how pls. (i m developping a windows form application and not a web application)Thanks |
|
dfiala
Posting Yak Master
116 Posts |
Posted - 2006-05-14 : 21:12:31
|
Yes.Use a template column.In the item template add a dropdownlist.In the Item_DataBound event, bind the dropdown list to the second table.Here's th basic idea. http://www.odetocode.com/Articles/231.aspxBut instead of creating the dropdown list items manually, you'd bind the grid to the table.Dean FialaVery Practical Software, IncNow with Blogging...http://www.vpsw.com/blogbabyMicrosoft MVP |
 |
|
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2006-05-14 : 21:15:18
|
sorry I forgot to mention that i m making a windwos form application and not a web application thanks |
 |
|
dfiala
Posting Yak Master
116 Posts |
|
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2006-05-15 : 00:23:15
|
funny, thanks |
 |
|
|
|
|