|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
step by step guide to databinding?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 Doug,
See this, where there is asked about the dataadatper you need the oledbdataadapter. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkwalkthroughusingdatagridwebcontroltoreadwritedata.asp I hope this helps, Cor 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/quickstart/aspplus/samples/webforms/ctrlref/webctrl/datagrid/doc_datagrid.aspx Regards, Philip |
|||||||||||||||||||||||