473,503 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can't select dataSet from DataGrid

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
Nov 16 '05 #1
3 1282
You will have to do this in code. Do you have an instance of Form2 in
Form1?

dataGrid1.Datasource = Form2.dataSet1;

Chris

"Enuar Lastamp" <er****@yahoo.com> wrote in message
news:eA**************@TK2MSFTNGP15.phx.gbl...
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

Nov 16 '05 #2
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?
"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> ha
scritto nel messaggio news:ew**************@TK2MSFTNGP12.phx.gbl...
You will have to do this in code. Do you have an instance of Form2 in
Form1?

dataGrid1.Datasource = Form2.dataSet1;

Chris

"Enuar Lastamp" <er****@yahoo.com> wrote in message
news:eA**************@TK2MSFTNGP15.phx.gbl...
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


Nov 16 '05 #3
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

"Enuar Lastamp" <er****@yahoo.com> wrote in message
news:ep*************@tk2msftngp13.phx.gbl...
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?
"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> ha
scritto nel messaggio news:ew**************@TK2MSFTNGP12.phx.gbl...
You will have to do this in code. Do you have an instance of Form2 in
Form1?

dataGrid1.Datasource = Form2.dataSet1;

Chris

"Enuar Lastamp" <er****@yahoo.com> wrote in message
news:eA**************@TK2MSFTNGP15.phx.gbl...
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



Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1064
by: Juan | last post by:
Do i have to loop trough a datagrid in order to find and select a row just being inserted in the dataset connected to the data grid? is there any event i can capture in the datagrid to obtain the...
3
339
by: Ed_P. | last post by:
Hello I have a Windows Form that I am trying to use to display data in a DataGrid object from an Access Database. I have created an OleDbCommand Object (with the appropriate Connection string) to...
2
5428
by: jez123456 | last post by:
Hi. I have a web form with a datagrid that displays employees who are on holiday. One of the datagrid columns shows the date of their last day of holiday, but what I really require is the Start Back...
4
1999
by: CaptRR | last post by:
I think this is the right group to post to, so here goes. My problem is this, I cannot update the datarow to save my life. Been on this for 2 days now, and still am no closer to figuring it out...
6
1733
by: Teep | last post by:
Below is my code for dropdownlist that is populated from a SQL table. After a selection from the ddl, a datagrid is suppose to come up pertaining to the information selected, but I keep getting a...
1
1840
by: Dan Sikorsky | last post by:
How do you select records from one dataset and create a second dataset? I need to pull out the master records from a dataset and create a master datagrid in which to embed a details datagrid (for...
6
4730
by: Jack | last post by:
I have the following: * An OLEDBCommand with command text "SELECT CAMPAIGN, DAY_OUT WHERE (CAMPAIGN LIKE '@campaign')" * A DataAdapter that point the select to the above command * A data grid...
1
7107
by: Mrozu | last post by:
Hi I need execute SELECT SQL query in DataSet. No in SQL server(da.selectcommand) and fill dataset, only show in datagrid filtered by select-where query records from dataset:) For example I...
4
1445
by: Rich | last post by:
Hello, I have a master and detail table in sql server. Say the master has 10 rows and detail has 45 rows. I fill 2 tables in my dataset in the client app. When I iterate through the master...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.