473,382 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

DataGrid vs. DataGridView

I must be overlooking something obvious here. I've constructed a dataset,
which I can bind to a DataGrid with no issues.

From the code below, what more do I need to do to get the same dataset to
bind to a DataGridView?

Thanks

John
Dim AppDataSet As New DataSet()
AppDataSet = New DataSet()
AppDataSet.Tables.Add(AppTable)

Dim AppDataWindow As New AppData
AppDataWindow.AppDataGrid.SetDataBinding(AppDataSe t,
EmvApplic(EmvApp).Name)

Dim AppDataGridViewBS As BindingSource
AppDataGridViewBS = New BindingSource
AppDataGridViewBS.DataSource = AppDataSet
AppDataWindow.AppDataGridView.DataSource = AppDataGridViewBS

'AppDataWindow.Name = EmvApplic(EmvApp).Name
AppDataWindow.Show()
Nov 15 '08 #1
1 1980

"John Whitworth" <se****@gEEEEEEEEEEEEEEEEmail.comwrote in message
news:eW**************@TK2MSFTNGP02.phx.gbl...
>I must be overlooking something obvious here. I've constructed a dataset,
which I can bind to a DataGrid with no issues.

From the code below, what more do I need to do to get the same dataset to
bind to a DataGridView?

Thanks

John
Dim AppDataSet As New DataSet()
AppDataSet = New DataSet()
AppDataSet.Tables.Add(AppTable)

Dim AppDataWindow As New AppData
AppDataWindow.AppDataGrid.SetDataBinding(AppDataSe t,
EmvApplic(EmvApp).Name)

Dim AppDataGridViewBS As BindingSource
AppDataGridViewBS = New BindingSource
AppDataGridViewBS.DataSource = AppDataSet
AppDataWindow.AppDataGridView.DataSource = AppDataGridViewBS

'AppDataWindow.Name = EmvApplic(EmvApp).Name
AppDataWindow.Show()
I've solved it...the BindingSource has to be AppTable, and not AppDataSet.

JW
Nov 16 '08 #2

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

Similar topics

2
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...
2
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...
0
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
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
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. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.