step by step guide to databinding?

D

Doug

Hi,

Could you please provide me with a step approach to using the datagrid in
vb.net using visual studio 2003 Ent Arch edition

I would like to display the contents of an ms access table in my asp.net
page.

thanks

Doug
 
P

Philip Hristov

Hello,

After you setup the OleDBConnection object, OleDBDataAdapter and a
DataSet to show your table you have to perform you have to do this:

myConnection.Open 'Opens the connection
myDataAdapter.Fill(DataSet) 'Fills the DataSet with the data
MyDataGrid.DataSource = DataSet 'Sets the datasource from where we want
to get the data
MyDataGrid.DataBind 'the most important part, without calling the
DataBind method the DataGrid will not be shown
MyConnection.Close 'closes the connection

Also, you can check these samples about how to work with WEB DataGrid
in VB.NET -
http://samples.gotdotnet.com/quicks...ms/ctrlref/webctrl/datagrid/doc_datagrid.aspx

Regards,

Philip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top