Click here to Skip to main content
15,914,016 members
Home / Discussions / C#
   

C#

 
QuestionInstallation Script [modified] Pin
mfc_surfer22-May-06 2:45
mfc_surfer22-May-06 2:45 
AnswerRe: Installation Script [modified] Pin
Nimit Patel22-May-06 3:30
Nimit Patel22-May-06 3:30 
QuestionC# : implement chat room in pocket pc Pin
Pentellcc22-May-06 2:31
Pentellcc22-May-06 2:31 
QuestionDo pocket pc support foreign language? Pin
Pentellcc22-May-06 2:24
Pentellcc22-May-06 2:24 
QuestionSingletons.. Pin
martin_hughes22-May-06 2:20
martin_hughes22-May-06 2:20 
AnswerRe: Singletons.. [modified] Pin
J4amieC22-May-06 2:55
J4amieC22-May-06 2:55 
GeneralRe: Singletons.. [modified] Pin
martin_hughes22-May-06 8:55
martin_hughes22-May-06 8:55 
Questionexception Pin
Smitha Sondur22-May-06 2:14
Smitha Sondur22-May-06 2:14 
Questiona few important questions about forms ? help please ... Pin
cmpeng3422-May-06 2:03
cmpeng3422-May-06 2:03 
AnswerRe: a few important questions about forms ? help please ... Pin
Dustin Metzgar22-May-06 5:46
Dustin Metzgar22-May-06 5:46 
QuestionFind Button Pin
alwz_nikhil22-May-06 1:43
alwz_nikhil22-May-06 1:43 
AnswerRe: Find Button Pin
CodyGen22-May-06 4:44
CodyGen22-May-06 4:44 
Questionprinting unicode characters on Console [modified] Pin
cshivaprasad22-May-06 1:43
cshivaprasad22-May-06 1:43 
AnswerRe: printing unicode characters on Console [modified] Pin
stancrm22-May-06 3:53
stancrm22-May-06 3:53 
QuestionFileStream in c# Pin
H he el el oooo22-May-06 1:26
H he el el oooo22-May-06 1:26 
AnswerRe: FileStream in c# Pin
Colin Angus Mackay22-May-06 1:46
Colin Angus Mackay22-May-06 1:46 
QuestionDatagridview from 2 tables Pin
nikitaj22-May-06 1:08
nikitaj22-May-06 1:08 
Hi,

I'm having a situation like this.

I am using a datagridview which fills up Item details from a table, say Items.

I am also adding a Datagridcomboboxcolumn to this datagrid whose datasource is table 'Category' from where it should show various category names in combo box for user to select one.

I can see the datagridview being filled up with data from Items table.I can also see the combo box column being generated for each row.However, the combobox doesnot work and show any values from its datasource.

How can I show rows from one table and combo box in each row from other table in a datagridviw ?

here is the pseudocode :

DataTable dt = objItems.GetItems(); // gives Item details in a table.

DataTable dtCat = objCat.GetCategory(); // returns category details in form of a table.

dgItems.DataSource = dt; // dgItems is a datagridview created with the help of toolbox on a winform.

DataGridViewComboBoxColumn comboColumn = new DataGridViewComboBoxColumn();

comboColumn.DataPropertyName = "CategoryDesc";

comboColumn.HeaderText = "Select Category";

comboColumn.MaxDropDownItems = 5;

comboColumn.DataSource = dtCat;

comboColumn.ValueMember = "CategoryId";

comboColumn.DisplayMember = "CategoryDesc";

dgItems.Columns.Insert(dt.Coulmns.Count + 1, comboColumn);



Thanks in advance.

Nikita

QuestionC#.net Pin
abhaygalande22-May-06 0:32
abhaygalande22-May-06 0:32 
AnswerRe: C#.net Pin
Robert Rohde22-May-06 0:40
Robert Rohde22-May-06 0:40 
AnswerRe: C#.net Pin
Jax_qqq22-May-06 0:42
Jax_qqq22-May-06 0:42 
AnswerRe: C#.net Pin
Sebastian Schneider22-May-06 1:27
Sebastian Schneider22-May-06 1:27 
AnswerRe: C#.net Pin
Christian Graus22-May-06 1:33
protectorChristian Graus22-May-06 1:33 
QuestionHOWTO make child controls scroll inside a containercontrol Pin
batmike200022-May-06 0:09
batmike200022-May-06 0:09 
AnswerRe: HOWTO make child controls scroll inside a containercontrol Pin
alexey N22-May-06 0:25
alexey N22-May-06 0:25 
AnswerRe: HOWTO make child controls scroll inside a containercontrol Pin
alexey N22-May-06 0:29
alexey N22-May-06 0:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.