Adding Extra Row Of Header

Discussion in 'ASP .Net' started by Jim Heavey, Nov 13, 2003.

  1. Jim Heavey

    Jim Heavey Guest

    Hello, I am trying to figure out how to add an extra row
    of heading to my datagrid. I came up with the following
    code:

    Public Sub dgNewMovies_ItemCreated(ByVal sender As
    Object, ByVal e As
    System.Web.UI.WebControls.DataGridItemEventArgs) Handles
    dgNewMovies.ItemCreated

    If e.Item.ItemType = ListItemType.Header Then
    Dim Item As DataGridItem
    Dim ItemCell As TableCell
    Item = New DataGridItem(0, 0,
    ListItemType.Header)
    ItemCell = New TableCell()
    ItemCell.ColumnSpan = 7
    Item.Cells.Add(ItemCell)
    ItemCell.Text = "Add Movies And Tapes
    DataEntry"
    dgNewMovies.Controls(0).Controls.AddAt(0,
    Item)
    End If

    End Sub

    It runs through the code, but no additional heading - I
    still have my original headings. Any idea what I am
    doing wrong?
    Jim Heavey, Nov 13, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AMD Desktop
    Replies:
    3
    Views:
    1,922
    Steve C. Orr [MVP, MCSD]
    Nov 2, 2004
  2. =?Utf-8?B?c2FsZWVr?=

    DataGrid - adding an extra header...

    =?Utf-8?B?c2FsZWVr?=, Jan 17, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    5,050
    =?Utf-8?B?c2FsZWVr?=
    Jan 17, 2005
  3. mathieu
    Replies:
    3
    Views:
    585
    Bo Persson
    Sep 4, 2009
  4. D
    Replies:
    0
    Views:
    199
  5. pickedaname

    Gridview extra header row with command button and paging

    pickedaname, Jun 22, 2006, in forum: ASP .Net Web Controls
    Replies:
    10
    Views:
    663
    pickedaname
    Jul 28, 2006
Loading...

Share This Page