Click here to Skip to main content
15,889,335 members
Home / Discussions / C#
   

C#

 
GeneralRe: this is only for Christian Graus Pin
S K Y12-Mar-09 22:38
S K Y12-Mar-09 22:38 
GeneralRe: this is only for Christian Graus Pin
0x3c013-Mar-09 3:52
0x3c013-Mar-09 3:52 
QuestionAutomatic Driver install with code Pin
zelect12-Mar-09 14:33
zelect12-Mar-09 14:33 
AnswerRe: Automatic Driver install with code Pin
Christian Graus12-Mar-09 16:26
protectorChristian Graus12-Mar-09 16:26 
Questiona problem of AjaxPro and js Pin
peacefulheart12-Mar-09 14:28
peacefulheart12-Mar-09 14:28 
Questionembedding a trackbar (windows application) to internet explorer Pin
tonyblair12-Mar-09 14:26
tonyblair12-Mar-09 14:26 
AnswerRe: embedding a trackbar (windows application) to internet explorer Pin
Christian Graus12-Mar-09 16:28
protectorChristian Graus12-Mar-09 16:28 
QuestionAdd data in gridview from multiple tables and combobox [modified] Pin
haroon198012-Mar-09 14:06
haroon198012-Mar-09 14:06 
Hi,
Basically i am trying to make a combobox in 2nd row of gridview...

two issues in below function:
Two things:
1. Now adapter2 is populated in gridview and i do not see any combobox instead i see only columns from adapter2

2. I do not see the adapter1 filled at all???

void fillData()
{
database = new OleDbConnection(connectionString);
database.Open();
OleDbDataAdapter adapter1 = new OleDbDataAdapter("select BillD.ProductName,BillD.ProductID,BillD.Saletype,BillD.InQty,BillD.SBtype,BillD.Dis1,BillD.Type,BillD.InPrice from BillDetails BillD", database);
OleDbDataAdapter adapter2 = new OleDbDataAdapter("Select Products.ProdID,Products.ProductName,Packing.PackingName from Packing INNER JOIN Products ON Packing.PackingID=Products.Packing", database);

{
DataGridViewComboBoxColumn dgridcolumn = new DataGridViewComboBoxColumn();
DataSet ds = new DataSet();
DataTable dt = new DataTable();
DataTable packDT = new DataTable();
adapter1.Fill(dt);
dataGridView1.DataSource = dt;
adapter2.Fill(packDT);
ds.Tables.Add(packDT);
dataGridView1.DataSource = ds;
dataGridView1.DataMember = ds.Tables[0].TableName;
dgridcolumn.DataSource = ds.Tables[0];
dgridcolumn.ValueMember = ds.Tables[0].Columns[1].ColumnName.ToString();
}
}



Thanks,

Please help

modified on Friday, March 13, 2009 4:51 AM

AnswerRe: Add data in gridview from multiple tables and combobox Pin
haroon198012-Mar-09 22:52
haroon198012-Mar-09 22:52 
QuestionAdd combox in gridview - Getting OledbException Pin
haroon198012-Mar-09 13:19
haroon198012-Mar-09 13:19 
AnswerRe: Add combox in gridview - Getting OledbException Pin
haroon198012-Mar-09 14:02
haroon198012-Mar-09 14:02 
QuestionIs it possible to receive key input into two controls simultaneously? Pin
Yellow_Yackets12-Mar-09 11:26
Yellow_Yackets12-Mar-09 11:26 
AnswerRe: Is it possible to receive key input into two controls simultaneously? Pin
Nagy Vilmos12-Mar-09 11:52
professionalNagy Vilmos12-Mar-09 11:52 
GeneralRe: Is it possible to receive key input into two controls simultaneously? Pin
Yellow_Yackets12-Mar-09 11:57
Yellow_Yackets12-Mar-09 11:57 
GeneralRe: Is it possible to receive key input into two controls simultaneously? Pin
Nagy Vilmos12-Mar-09 12:09
professionalNagy Vilmos12-Mar-09 12:09 
GeneralRe: Is it possible to receive key input into two controls simultaneously? Pin
Yellow_Yackets12-Mar-09 15:22
Yellow_Yackets12-Mar-09 15:22 
GeneralRe: Is it possible to receive key input into two controls simultaneously? Pin
Yellow_Yackets12-Mar-09 15:40
Yellow_Yackets12-Mar-09 15:40 
GeneralRe: Is it possible to receive key input into two controls simultaneously? Pin
Nagy Vilmos12-Mar-09 23:09
professionalNagy Vilmos12-Mar-09 23:09 
GeneralRe: Is it possible to receive key input into two controls simultaneously? Pin
Yellow_Yackets13-Mar-09 7:10
Yellow_Yackets13-Mar-09 7:10 
QuestionSplitting video into frames Pin
Payam Rastogi12-Mar-09 10:25
Payam Rastogi12-Mar-09 10:25 
AnswerRe: Splitting video into frames Pin
Ravadre12-Mar-09 11:37
Ravadre12-Mar-09 11:37 
Questionjoin pieces in an image Pin
Umangj12-Mar-09 9:54
Umangj12-Mar-09 9:54 
AnswerRe: join pieces in an image Pin
Nagy Vilmos12-Mar-09 10:00
professionalNagy Vilmos12-Mar-09 10:00 
GeneralRe: join pieces in an image Pin
Umangj12-Mar-09 10:07
Umangj12-Mar-09 10:07 
GeneralRe: join pieces in an image Pin
Nagy Vilmos12-Mar-09 11:00
professionalNagy Vilmos12-Mar-09 11:00 

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.