Click here to Skip to main content
15,887,585 members
Home / Discussions / C#
   

C#

 
QuestionMDI parent form maximize problem Pin
atifamin200215-May-09 9:15
atifamin200215-May-09 9:15 
AnswerRe: MDI parent form maximize problem Pin
DaveyM6915-May-09 9:44
professionalDaveyM6915-May-09 9:44 
QuestionBackground worker Pin
Payam Rastogi15-May-09 6:54
Payam Rastogi15-May-09 6:54 
AnswerRe: Background worker Pin
DaveyM6915-May-09 9:50
professionalDaveyM6915-May-09 9:50 
GeneralRe: Background worker Pin
Payam Rastogi15-May-09 9:57
Payam Rastogi15-May-09 9:57 
GeneralRe: Background worker Pin
DaveyM6915-May-09 10:10
professionalDaveyM6915-May-09 10:10 
QuestionHow to prevent RowState change if Cell is not changed Pin
EURaklap15-May-09 6:19
EURaklap15-May-09 6:19 
QuestionMultiple forms and datagridviews Pin
bwood202015-May-09 6:02
bwood202015-May-09 6:02 
Hello,

I am having problems populating a second DataTable to use as a data source for a second datagridview on another form. The second DataTable is pulling data in from the main datagridview using a query but the second datagridview doesn't populate. Can someone point me in the right direction please? Here is the code I am running:


Form1:

string Query = ("SELECT DISTINCT product FROM [" + dataGridView1 + "]");
DataTable GetDocs = new DataTable(Query);
DataRow NewLine;
NewLine = GetDocs.NewRow();
GetDocs.Rows.Add(NewLine);

private DataSet Sds;
public DataSet GetDocs
{
get
{
return Sds;
}
set
{
Sds = value;
}

Form2:

InitializeComponent();
GetForm1 = new Form1();
object GD = GetForm1.GetDocs;


this.dataGridView1.RowHeadersVisible = false;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView3.RowHeadersVisible = false;
this.dataGridView4.RowHeadersVisible = false;
this.dataGridView1.DataSource = GD;

Tahnk you,

Brenton
AnswerRe: Multiple forms and datagridviews Pin
Henry Minute15-May-09 10:05
Henry Minute15-May-09 10:05 
GeneralRe: Multiple forms and datagridviews Pin
bwood202015-May-09 10:09
bwood202015-May-09 10:09 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute15-May-09 10:33
Henry Minute15-May-09 10:33 
GeneralRe: Multiple forms and datagridviews Pin
bwood202015-May-09 12:17
bwood202015-May-09 12:17 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute15-May-09 13:09
Henry Minute15-May-09 13:09 
GeneralRe: Multiple forms and datagridviews [modified] Pin
bwood202018-May-09 6:50
bwood202018-May-09 6:50 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute18-May-09 8:18
Henry Minute18-May-09 8:18 
GeneralRe: Multiple forms and datagridviews Pin
bwood202018-May-09 8:44
bwood202018-May-09 8:44 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute18-May-09 9:54
Henry Minute18-May-09 9:54 
GeneralRe: Multiple forms and datagridviews Pin
bwood202018-May-09 12:54
bwood202018-May-09 12:54 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute18-May-09 13:01
Henry Minute18-May-09 13:01 
GeneralRe: Multiple forms and datagridviews Pin
bwood202019-May-09 7:13
bwood202019-May-09 7:13 
GeneralRe: Multiple forms and datagridviews [modified] Pin
Henry Minute19-May-09 8:33
Henry Minute19-May-09 8:33 
GeneralRe: Multiple forms and datagridviews Pin
bwood202019-May-09 9:22
bwood202019-May-09 9:22 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute19-May-09 10:52
Henry Minute19-May-09 10:52 
GeneralRe: Multiple forms and datagridviews Pin
bwood202019-May-09 12:36
bwood202019-May-09 12:36 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute19-May-09 13:48
Henry Minute19-May-09 13:48 

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.