Adding customised header in gridview

  • 12 years ago
    I need to three rows in gridview header One row is inserted as ordinary header.The next row header was added using following code..but similarly i couldn add the third row header.. In this code,a gridviewrow is created.If i try to add another gridview row it couln bind in the gridview.......pls try to solve this issue My gridview header should be like this First header Transaction Count,under this two column,under this two subcolumn,another two column Protected Sub GridView4_Merge_Header_RowCreated(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles grdUti.RowCreated If e.Row.RowType = DataControlRowType.Header Then 'Build custom header. Dim oGridView As GridView = DirectCast(sender, GridView) Dim oGridViewRow4 As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert) Dim oTableCell4 As New TableCell() oTableCell4.Text = "TT" oTableCell4.HorizontalAlign = HorizontalAlign.Center oTableCell4.Font.Bold = True oTableCell4.ColumnSpan = 3 oGridViewRow4.Cells.Add(oTableCell4) oGridView.Controls(0).Controls.AddAt(0, oGridViewRow4) End If End Sub
  • 12 years ago

    Hi Shiji,

    Try to present your conern in a easy to read format. And try to read once before you post your concern. There are lot many incomplete words which can be misleading in understanding your problem.

    Regards,

    Royal

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Owning a computer without programming is like having a kitchen and using only the microwave oven” - Charles Petzold