can't select dataSet from DataGrid

  • Thread starter Thread starter Enuar Lastamp
  • Start date Start date
E

Enuar Lastamp

Hello, I'm programming in C#, If I put dataSet1 (declared public) in Form2
and dataGrid1 in Form1 when I clic on dataGrid1 and I select DataSource
(from properties) I can't see and select dataSet1,
how can I select dataSet1? thanks ernuar
 
You will have to do this in code. Do you have an instance of Form2 in
Form1?

dataGrid1.Datasource = Form2.dataSet1;

Chris
 
yes I have an istance of Form2 in Form1, but is there a way to do this
without adding code but just selecting dataSet1 from the properties box of
dataGrid1?
 
Not that I know of.. but you know that all selecting that box will do is
add the same line of code into the designer section of your code.

Chris
 
Back
Top