Protected Sub GridView1_RowCreated(ByVal sender As Object, _
              ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) _
              Handles GridView1.RowCreated
    If e.Row.RowType = DataControlRowType.Header Then
            Dim oCell As New TableCell
            oCell.ColumnSpan = e.Row.Cells.Count
            e.Row.Cells.Clear()
            oCell.Text = "Merged header"
            e.Row.Cells.Add(oCell)
        End If
End Sub

当然也可以在GridView_DataBound()事件中进行合并.

相关文章:

  • 2021-07-15
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-15
  • 2021-09-24
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案