I have a datagrid and I need to access each element for other
purposes. For that I need to copy each column with 'n' elements of
datagrid into an array with 'n' size. How to do this.
My datagrid code is as follows.
Sub Page_Load(Src As Object, E As EventArgs)
Dim strConn as string ="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=" & server.mappath("dbase3.mdb") & ";"
Dim strSQL as string ="select * from Factory1 order by Period"
Dim Conn as New OLEDBConnection(strConn)
Dim Cmd as New OLEDBCommand(strSQL,Conn)
Dim Rdr as OLEDBDataReader
Conn.Open()
Rdr=Cmd.ExecuteReader()
MyDataGrid.DataSource = Rdr
MyDataGrid.DataBind()
Rdr.close()
Conn.close()
End Sub