I have a datagrid working great in an ASP.NET application. Does anyone
have any idea how to bind textboxes to the selected record in the datagrid?
the datagrid and textboxes are on different webforms in the frameset.
Here's what I am trying:
Private Sub DataGrid1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DataGrid1.SelectedIndexChanged
WebForm2.txtFirstName.Text = DataGrid1.Items
(DataGrid1.SelectedIndex).Cells.Item(3).Text()
WebForm2.txtFirstName.DataBind()
End Sub
Here is the thrown exception:
Index 0 is not non-negative and below total rows count.
Here's how I am filling the DA:
SqlDataAdapter1.Fill(DataSet11)
DataGrid1.DataBind()
Thank you for your time.
Aaron
|