473,513 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid to datagridview

cj
how do I do this in 2008 using the datagridview? The SetDataBinding part.
mySQLCommand.CommandText = "select * from VH_TBP"
mySQLCommand.Connection = myDbConnection
myDataAdapter.SelectCommand = mySQLCommand

myDataAdapter.Fill(ds, tableName)

DataGrid1.SetDataBinding(ds, tableName)

Jun 27 '08 #1
1 826
cj,

It is with a datagrid
DataGrid1.DataSource(ds, tableName)
That one you can use with the DataGridView in the same way

Cor

"cj" <cj@nospam.nospamschreef in bericht
news:%2****************@TK2MSFTNGP03.phx.gbl...
how do I do this in 2008 using the datagridview? The SetDataBinding part.
mySQLCommand.CommandText = "select * from VH_TBP"
mySQLCommand.Connection = myDbConnection
myDataAdapter.SelectCommand = mySQLCommand

myDataAdapter.Fill(ds, tableName)

DataGrid1.SetDataBinding(ds, tableName)
Jun 27 '08 #2

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

Similar topics

2
8481
by: JochenZ | last post by:
Hello, I have a DataGrid(View) and a DataTable. The DataTable is displayed in the DataGridView: dataGridView.DataSource = theTable; The user is allowed to select some rows and then the...
1
1522
by: Irfan | last post by:
hi, all In VB 2005 Beta i cant find dataGrid control in the toolbox, instead DataGridView is available. What is the differance between the two ? How can i get dataGrid Control? Thanks
5
7086
by: ComputerStop | last post by:
I am attempting to print a datagridview. I have not found any method that works successfully. Has any one been successful with this?
3
1722
by: reidarT | last post by:
I have a datagrid with columns. One of the columns are a textbox. I want the text in this column shown in a textbox outside the datagrid. How can I do that when clicking the actual row in the...
0
1236
by: Brett Romero | last post by:
I've written a DataGrid class that inhertis from DataGrid. There's a lot of code in this class specific to the DataGrid's functionality. I mainly want to use the DataGridView for drop down combo...
2
1028
by: Warex | last post by:
Hello I am having a problem with using the datagrid. I am attaching my data through a dataset via code to a datagridview.datasource. All if fine except if I make any changes to the datagrid the...
1
3782
by: seanmle | last post by:
I want to build a windows application that has a datagrid filled with data. When a person modifies information on a single cell, it updates the database without the user having to click on a save...
2
1764
by: cj | last post by:
I was looking over some of my 2003 code today (see below) that loads a foxpro table via oledb connection. I used a sub "autosizecolumns" I found on the web but I never quite understood why they...
2
305
by: Rob | last post by:
After I type my DataGrid name in the code, I am expecting to have a couple options (methods ?) available... I see them in sample code, but they are not available for me to select. ...
3
1823
by: frostbb | last post by:
Greetings, We're starting to transition our legacy C# apps from earlier versions to VS2008 versions. Many of our apps allow the user to select a row from a DataGrid into a 'Data Edit' area...
0
7259
marktang
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,...
0
7158
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
7380
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
7535
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...
0
7523
tracyyun
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...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
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
1592
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 ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.