' ASPX_Datagrid_using_wucDataSet_ReadOnly.aspx.vb.txt ' ' Mostly writen by Dan Garlen dan.g@kgsystems.com 2/22/04 ' Use at your own risk - but, have fun doing it. ' Portions of this code have been shamlessly copied from other unnamed sources - thank you to all. ' ' Requires: ASCX_Northwind_Dataset_and_Status_WebUserControl_wucDataSet.ascx.vb.txt ' ' Place a copy of "Northwind.mdb" in the project virtual directory ie C:\InetPub\wwwRoot\DataGridExample ' ' Create this Client WebForm with a DataGrid (leave default name of "DataGrid1") ' Drag "wucDataSet.ascx" onto WebForm ' Leave name as default "WucDataSet1" ' Add this line of code: "Protected WithEvents wucDataSet1 As wucDataSet" under DataGrid1 declaration ' ' Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ds As DataSet = wucDataSet1.dsNorthwind If wucDataSet1.Status Then DataGrid1.DataSource = ds DataGrid1.DataMember = "tblCustomers" DataGrid1.DataBind() End If End Sub