Using the sample walkthrough:
Walkthrough: Using a DataGrid Web Control to Read and Write Data
This is the Update command code:
Private Sub DataGrid1_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
DataGrid1.UpdateCommand
Dim categoryName, categoryDescription As String

' Gets the value of the key field of the row being updated
Dim key As String = DataGrid1.DataKeys(e.Item.ItemIndex).ToString()

' Gets get the value of the controls (textboxes) that the user
' updated. The DataGrid columns are exposed as the Cells collection.
' Each cell has a collection of controls. In this case, there is only
one
' control in each cell -- a TextBox control. To get its value,
' you copy the TextBox to a local instance (which requires casting)
' and extract its Text property.
'
' The first column -- Cells(0) -- contains the Update and Cancel
buttons.
Dim tb As TextBox

' Gets the value the TextBox control in the third column
tb = CType(e.Item.Cells(2).Controls(0), TextBox)
categoryName = tb.Text

' Gets the value the TextBox control in the fourth column
tb = CType(e.Item.Cells(3).Controls(0), TextBox)
categoryDescription = tb.Text

' Finds the row in the dataset table that matches the
' one the user updated in the grid. This example uses a
' special Find method defined for the typed dataset, which
' returns a reference to the row.
Dim r As dsCategories.CategoriesRow
r = DsCategories1.Categories.FindByCategoryID(key)

' Updates the dataset table.
r.CategoryName = categoryName
r.Description = categoryDescription

' Calls a SQL statement to update the database from the dataset
SqlDataAdapter1.Update(DsCategories1)

' Takes the DataGrid row out of editing mode
DataGrid1.EditItemIndex = -1

' Refreshes the grid
DataGrid1.DataBind()
End Sub


If the datagrid's scourse is a single table then it works fine, but as soon
as it is based on a query or procedure containing joined tables then I get
an error on this line:
r = DsCategories1.Categories.FindByCategoryID(key)
Stating that "FindByCategoryID(key)" is not a member of
"DsCategories1.Categories"

Why do I get this error, and how do I resolve it.
Please try and base your sollution on VB.Net.

Thanks