step by step guide to databinding?

  • Thread starter Thread starter Doug
  • Start date Start date
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
 
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
 
Back
Top