Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
QuestionAccess to another form's controls. Pin
Fatemeh.k9-Apr-09 19:39
Fatemeh.k9-Apr-09 19:39 
AnswerRe: Access to another form's controls. Pin
Giorgi Dalakishvili9-Apr-09 19:56
mentorGiorgi Dalakishvili9-Apr-09 19:56 
AnswerRe: Access to another form's controls. Pin
jaypatel5129-Apr-09 20:04
jaypatel5129-Apr-09 20:04 
GeneralRe: Access to another form's controls. Pin
Fatemeh.k9-Apr-09 20:16
Fatemeh.k9-Apr-09 20:16 
GeneralRe: Access to another form's controls. Pin
DaveyM699-Apr-09 22:35
professionalDaveyM699-Apr-09 22:35 
GeneralRe: Access to another form's controls. Pin
Fatemeh.k13-Apr-09 21:46
Fatemeh.k13-Apr-09 21:46 
GeneralRe: Access to another form's controls. Pin
DaveyM6914-Apr-09 9:10
professionalDaveyM6914-Apr-09 9:10 
QuestionHow to add data from multiple table to datagrid in C# Pin
aashish.saalvi9-Apr-09 18:01
aashish.saalvi9-Apr-09 18:01 
Hi i am building an application in which i want to generate a report. That report consists of data from multiple tables. I tried doing this but when the datagrid is populated with the dataset/datatable the record from second table comes on second row & from third table comes on third row. I am using access database. can someone help me out of this.
Thanks in advance. the code is as shown below.

private void Form1_Load(object sender, EventArgs e)
{

try
{

con = new OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=e:/ReportTest/ReportTest/ContractSystemDB.mdb");
con.Open();

ds = new DataSet();
dt = new DataTable("ashish");

cmd = new OleDbCommand("select * from CommonData",con);
rd = cmd.ExecuteReader();
if (rd.HasRows)
{
while (rd.Read())
{
da = new OleDbDataAdapter("select * from InitialApproval where InitialApproval.PrNo='"+rd.GetString(0)+"'",con);
da.Fill(ds);
da.Dispose();

da1 = new OleDbDataAdapter("select EstimatedVal,FwdDtByPSD from PSDApproval where PSDApproval.PrNo='" + rd.GetString(0) + "'",con);
da1.Fill(ds);
da1.Dispose();

da2 = new OleDbDataAdapter("select POValue,rcd_dtCC,saving from CommonData where CommonData.PrNo='" + rd.GetString(0) + "'", con);
da2.Fill(ds);
da2.Dispose();
}
}
contractSystemDBDataSetBindingSource.DataSource = ds;
MyGrid.DataSource = contractSystemDBDataSetBindingSource.DataSource;

MessageBox.Show("Record Added To Grid View");
}
catch (Exception ex)
{
MessageBox.Show("Error==>" + ex);
}
finally
{
con.Close();
}
}
AnswerRe: How to add data from multiple table to datagrid in C# Pin
jaypatel5129-Apr-09 20:09
jaypatel5129-Apr-09 20:09 
QuestionTabIndex Order problem Pin
soulidentities9-Apr-09 17:14
soulidentities9-Apr-09 17:14 
AnswerRe: TabIndex Order problem Pin
Henry Minute10-Apr-09 1:25
Henry Minute10-Apr-09 1:25 
QuestionHow can I make listBox in WPF set to a default index? Pin
FrankeyJames9-Apr-09 12:41
FrankeyJames9-Apr-09 12:41 
AnswerRe: How can I make listBox in WPF set to a default index? Pin
FrankeyJames10-Apr-09 8:14
FrankeyJames10-Apr-09 8:14 
GeneralRe: How can I make listBox in WPF set to a default index? Pin
FrankeyJames12-Apr-09 16:02
FrankeyJames12-Apr-09 16:02 
QuestionIDictionary on Abstract Class Pin
Jammer9-Apr-09 10:25
Jammer9-Apr-09 10:25 
AnswerRe: IDictionary on Abstract Class Pin
DaveyM699-Apr-09 11:07
professionalDaveyM699-Apr-09 11:07 
GeneralRe: IDictionary on Abstract Class Pin
Jammer9-Apr-09 11:09
Jammer9-Apr-09 11:09 
GeneralRe: IDictionary on Abstract Class Pin
harold aptroot9-Apr-09 11:32
harold aptroot9-Apr-09 11:32 
GeneralRe: IDictionary on Abstract Class Pin
Jammer9-Apr-09 12:20
Jammer9-Apr-09 12:20 
GeneralRe: IDictionary on Abstract Class Pin
harold aptroot9-Apr-09 12:49
harold aptroot9-Apr-09 12:49 
GeneralRe: IDictionary on Abstract Class Pin
Jammer9-Apr-09 12:55
Jammer9-Apr-09 12:55 
GeneralRe: IDictionary on Abstract Class Pin
S. Senthil Kumar11-Apr-09 4:01
S. Senthil Kumar11-Apr-09 4:01 
QuestionOne pixel alignment differences between designer and run time form Pin
Dan Neely9-Apr-09 9:41
Dan Neely9-Apr-09 9:41 
AnswerRe: One pixel alignment differences between designer and run time form Pin
Henry Minute10-Apr-09 1:31
Henry Minute10-Apr-09 1:31 
GeneralRe: One pixel alignment differences between designer and run time form Pin
Dan Neely10-Apr-09 2:55
Dan Neely10-Apr-09 2:55 

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.