How to use Rowspan in Gridview for 1st Column only

前端 未结 3 1957
遥遥无期
遥遥无期 2020-12-17 20:47

Need help to resolve a issue related with Gridview layout. I am trying to implement custome Gridview with Itemtemplate Columns using C#.Net language and want to include view

3条回答
  •  北海茫月
    2020-12-17 21:34

        'VB.NET Code
    
    
    Private Sub DG_Data_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles DG_Data.RowDataBound
                Try
    
                    'fusion , rowspan , colspan , 
                    If e.Row.RowType = DataControlRowType.DataRow Then
                        If e.Row.RowIndex Mod 4 = 0 Then
                            e.Row.Cells(0).Attributes.Add("rowspan", "4")
                        Else
                            e.Row.Cells(0).Visible = False
                        End If
                    End If
    
    
    
                Catch ex As Exception
                    jq.msgErrorLog(ex)
                End Try
            End Sub
    

提交回复
热议问题