Hi, is there any way to copy a dataset to a datagrid? I have a
dataset and want to copy to a datagridview, but I get no results....
thx! 4 2276
Soulless,
you cannot "copy" a DataSet to a DataGrid. DataGrid only knows how to do
DataBinding against the DataSource.
So, you set DataSource property of the DataGrid to DataSet, or to one of the
DataTables in the DataSet.
-- Peter
// Abandon all hope, ye who enter here. http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"Soulless" wrote:
Hi, is there any way to copy a dataset to a datagrid? I have a
dataset and want to copy to a datagridview, but I get no results....
thx!
On Nov 1, 3:22 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
Soulless,
you cannot "copy" a DataSet to a DataGrid. DataGrid only knows how to do
DataBinding against the DataSource.
So, you set DataSource property of the DataGrid to DataSet, or to one of the
DataTables in the DataSet.
-- Peter
// Abandon all hope, ye who enter here.http://www.eggheadcafe.com
unBlog:http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"Soulless" wrote:
Hi, is there any way to copy a dataset to a datagrid? I have a
dataset and want to copy to a datagridview, but I get no results....
thx!- Hide quoted text -
- Show quoted text -
I created a dataset and set my datasource of the grid to it.
I am getting the following error now:
Error 12 Cannot implicitly convert type 'System.Data.DataTable' to
'OpTx.Extract.DataSet.Impac.dsUpdateSQL' C:\develop\extract\Forms\Impac
\FormScheduleNotes.cs 720 28 Forms
The line of code is:
dsUpdateSQL1 = ibrScheduleNotes.dsSched.Tables["Schedule"].Copy();
dsUpdateSQL1 is my dataset.
Any ideas?
On Nov 1, 3:22 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
Soulless,
you cannot "copy" a DataSet to a DataGrid. DataGrid only knows how to do
DataBinding against the DataSource.
So, you set DataSource property of the DataGrid to DataSet, or to one of the
DataTables in the DataSet.
-- Peter
// Abandon all hope, ye who enter here.http://www.eggheadcafe.com
unBlog:http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"Soulless" wrote:
Hi, is there any way to copy a dataset to a datagrid? I have a
dataset and want to copy to a datagridview, but I get no results....
thx!- Hide quoted text -
- Show quoted text -
Hi,
I have created a dataset and have set my datasource on the grid to the
dataset.
I get the following error:
Error 12 Cannot implicitly convert type 'System.Data.DataTable' to
'OpTx.Extract.DataSet.Impac.dsUpdateSQL' C:\develop\extract\Forms\Impac
\FormScheduleNotes.cs 720 28 Forms
The syntax is:
dsUpdateSQL1 = ibrScheduleNotes.dsSched.Tables["Schedule"].Copy();
dsUpdateSQL1 is my dataset and the ibrScheduleNotes.dsSched is a
dataset from another class.
Hi,
Wouldn't the copy have to be table to table?
The ouput of copy is a datatable not a dataset.
dsUpdateSQL1.Tables["mySchedule"] =
ibrScheduleNotes.dsSched.Tables["Schedule"].Copy();
I haven't tried this just seems logical.
hth
Bob
On 1 Nov 2007 15:48:25 -0700, Soulless <dg*******@gmail.comwrote:
>On Nov 1, 3:22 pm, Peter Bromberg [C# MVP] <pbromb...@yahoo.NoSpamMaam.comwrote:
>Soulless, you cannot "copy" a DataSet to a DataGrid. DataGrid only knows how to do DataBinding against the DataSource. So, you set DataSource property of the DataGrid to DataSet, or to one of the DataTables in the DataSet. -- Peter // Abandon all hope, ye who enter here.http://www.eggheadcafe.com unBlog:http://petesbloggerama.blogspot.com BlogMetaFinder: http://www.blogmetafinder.com "Soulless" wrote:
Hi, is there any way to copy a dataset to a datagrid? I have a
dataset and want to copy to a datagridview, but I get no results....
thx!- Hide quoted text -
- Show quoted text -
Hi,
I have created a dataset and have set my datasource on the grid to the dataset.
I get the following error:
Error 12 Cannot implicitly convert type 'System.Data.DataTable' to 'OpTx.Extract.DataSet.Impac.dsUpdateSQL' C:\develop\extract\Forms\Impac \FormScheduleNotes.cs 720 28 Forms
The syntax is:
dsUpdateSQL1 = ibrScheduleNotes.dsSched.Tables["Schedule"].Copy();
dsUpdateSQL1 is my dataset and the ibrScheduleNotes.dsSched is a dataset from another class.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike |
last post by:
I need to expand the DataSet class by inheriting from it and adding
functions that work on the data in the tables. However, since I can't
upcast how can I get my base DataSet object assigned an...
|
by: localhost |
last post by:
I have a static, thread-safe class with a DataSet as a property.
When the class is instanced into an object, some callers add rows to a
DataTable in the DataSet. Other callers read the DataSet.
...
|
by: Jeroen Pot |
last post by:
Hi,
I have a dataset "Mydataset" which contains of a few fields. (lets say
dept_id and dept_name)
A user can select several of these, and i want to export this to an access
database.
I have...
|
by: Dmitry Karneev |
last post by:
Hi!
I have a rather interesting problem.
I have a dataset that contatin data from database.
I need to clone this dataset with data but all id's in tables must be NULL
and all DataRowStates must...
|
by: JJ |
last post by:
Hi,
I need to pass a dataset to another win form along with a SqldataAdapter.
I don't want to recreate the SqlDataAdapter again either. So to pass to
another Win form in my windows form app, do...
| |
by: Vik |
last post by:
A dataset is saved in session state. Then the dataset is filled out with the
new records using a dataadapter. It appears then that the dataset saved in
session state contains the new records even...
|
by: David Richards |
last post by:
Hi,
I was wondering if anyone could help me. I have DataSet that contains
the following data tables Customers, Calls, Quotes, QuoteDetails,
Competitors, Contacts, Notes, and I have setup...
|
by: Mark Chambers |
last post by:
Hi there,
Can anyone explain the following (very) simple scenario.
1) I make an exact copy of my "DataSet" and delete one record from a given
table (in the copy)
2) I invoke...
|
by: Franck |
last post by:
how come unchanged always true even if data changed
This code come from my saving button:
============================================
DataSet ds1 = new DataSet();
DataSet ds2 = new...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |