Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 20th, 2005, 06:01 PM
Registered User
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shazaduh Send a message via Yahoo to shazaduh
Default displaying data in datagrid from Access


I am new in these forum. I have just finished the CH15 (Accessing Databases) in Beginning VB.Net Book. I have a question about binding data to DataGrid.
Suppose I have a table like

1 | data1
2 | data2
3 | data3
4 | data4

I want to display the data1 to data4 in the dataGrid in each column of datagrid

column1 column2 column3 column4
data1 data2 data3 data4

How would I bind the data in such a way to display this in datagrid control. any help would be greatly appreciated.


Old March 21st, 2005, 03:35 AM
Friend of Wrox
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr

FlexGrid, may be helpful for your case.

Use join and get the data in the single Query result/view. Or let us know your data binding options or relation between all 4 tables.

Gokulan Ethiraj
Old March 21st, 2005, 03:53 AM
Authorized User
Join Date: Mar 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts


1) Add a DataGrid control to ur form.
2) Add 4 BoundColumns to ur Grid,one for each field.
3) Set the DataField property of each column to respective fields.
4) Bind the Grid to database in code-behind file on the page load

This shud help..

It bcums FATAL wen my brain puts my eyes on Call-Waiting ! >|B-)
Old April 6th, 2005, 12:26 AM
Registered User
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shazaduh Send a message via Yahoo to shazaduh

Hi swastikagaur

Thanks for your response

BoundColumns is classe for System.Web.UI.WebControls.DataGridColumn
namespace. How would I used it in the windows standlone application?


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying data in Datagrid simpsg ASP.NET 2.0 Basics 3 October 6th, 2006 11:12 PM
Displaying data from access database [email protected] Classic ASP Basics 1 January 24th, 2006 06:35 PM
Displaying Access table data into Msflexgrid using Kaustav Pro VB Databases 0 September 25th, 2005 01:08 PM
Displaying 2 datatables in 1 datagrid muskaanbajaj Classic ASP Databases 5 May 19th, 2005 11:36 AM
populate data from Access Table into datagrid bisigreat VB How-To 6 August 17th, 2004 06:58 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.