Hello I am not much experienced but I can give you an overview
Protected Sub grdMaster_RowDataBound(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) _
Handles grdMaster.RowDataBound
Dim objListItem As DataControlRowState
objListItem = e.Row.RowState
Dim intMAsterID1 As Integer
If e.Row.RowType = DataControlRowType.DataRow Then
Dim grd As GridView
If objListItem = 5 Then
grd = CType(e.Row.FindControl("grdChildGridEdit"), GridView)
MasterTableID = Convert.ToInt32(CType(e.Row.DataItem, _
DataRowView).Row.ItemArray(0).ToString())
intMAsterID1 = MasterTableID
ElseIf objListItem = DataControlRowState.Normal Or _
objListItem = DataControlRowState.Alternate Then
grd = CType(e.Row.FindControl("grdChildGridNormal"), GridView)
intMAsterID1 = Convert.ToInt32(CType(e.Row.DataItem, _
DataRowView).Row.ItemArray(0).ToString())
Dim lnkButtton As LinkButton
lnkButtton = CType(e.Row.FindControl("Edit"), LinkButton)
If lnkButtton IsNot Nothing Then
lnkButtton.CommandName = "Edit Master"
lnkButtton.CommandArgument = intMAsterID1.ToString
End If
ElseIf objListItem = DataControlRowState.Edit Then
grd = CType(e.Row.FindControl("grdChildGridEdit"), GridView)
MasterTableID = Convert.ToInt32(CType(e.Row.DataItem, _
DataRowView).Row.ItemArray(0).ToString())
intMAsterID1 = MasterTableID
End If
If grd IsNot Nothing Then
grd.DataSourceID = ""
grd.DataSource = ChildDataSource
ChildDataSource.SelectParameters(_
"MasterTableID").DefaultValue = intMAsterID1
ChildDataSource.Select()
grd.DataBind()
End If
End If
End Sub
visit here to solve your .net grid related problem http://www.dapfor.com/Help/NetGrid/Index.aspx[^]