How can I populate an editable Grid with data from different tables from MSSQL Server'05 writing a code behind function???
I have used:
Dim conn As New SqlConnection(conn_web)
Dim objCmd As New SqlDataAdapter(sql, conn)
Dim oDS As New DataSet
objCmd.Fill(oDS, "TAB")
Dim dt As DataTable = oDS.Tables(0)
Dim rowCount As Integer = dt.Rows.Count
Dim dr As DataRow = dt.NewRow()
If rowCount = 0 Then
e.DataSource = Nothing
e.DataBind()
e.Focus()
Else
e.DataSource = dt
e.DataBind()
End If