Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
If (e.Row.RowState And DataControlRowState.Selected) = DataControlRowState.Selected Then
Dim oRow As New GridViewRow(0, -1, DataControlRowType.DataRow, e.Row.RowType)
GridView2.Visible = True
GridView2.DataBind()
Dim sHTML As String = Bee.Web.WebFunc.ControlToHTML(GridView2)
GridView2.Visible = False
Dim oCell As New TableCell
oCell.Text = sHTML
oCell.ColumnSpan = e.Row.Cells.Count
oRow.Cells.Add(oCell)
e.Row.Parent.Controls.AddAt(e.Row.RowIndex + 2, oRow)
End If
End Sub
- Dec 30 Wed 2009 17:59
Master-Detail GridView
close
全站熱搜
留言列表
禁止留言