how to know if a datagrid column is a template column?

Discussion in 'ASP .Net' started by Dexter, Jan 18, 2005.

  1. Dexter

    Dexter Guest

    hello all,
    i need to know, programatically, if a datagrid column is a template column,
    at itemdatabound event.
    somebody have a idea?

    Thanks.

    Dexter
    ____________________________________________________________________________

    If (e.Item.ItemType = ListItemType.Header) Then
    Dim quantidade = e.Item.Cells.Count
    Dim a As Integer
    For a = 0 To quantidade - 1

    'Here i need to know if is a templatecolumn

    Dim s As String = e.Item.Cells(a).Text
    If s <> "" And s <> "&nbsp;" Then
    e.Item.Cells(a).Text =
    pergunta_nome_coluna(viewstate("Tabela"), s)
    End If
    Next
    End If
    ____________________________________________________________________________
    Dexter, Jan 18, 2005
    #1
    1. Advertising

  2. myGrid.Columns(a).GetType()

    Eliyahu

    "Dexter" <> wrote in message
    news:eeRlYZV$...
    > hello all,
    > i need to know, programatically, if a datagrid column is a template

    column,
    > at itemdatabound event.
    > somebody have a idea?
    >
    > Thanks.
    >
    > Dexter
    >

    ____________________________________________________________________________
    >
    > If (e.Item.ItemType = ListItemType.Header) Then
    > Dim quantidade = e.Item.Cells.Count
    > Dim a As Integer
    > For a = 0 To quantidade - 1
    >
    > 'Here i need to know if is a templatecolumn
    >
    > Dim s As String = e.Item.Cells(a).Text
    > If s <> "" And s <> "&nbsp;" Then
    > e.Item.Cells(a).Text =
    > pergunta_nome_coluna(viewstate("Tabela"), s)
    > End If
    > Next
    > End If
    >

    ____________________________________________________________________________
    >
    >
    Eliyahu Goldin, Jan 18, 2005
    #2
    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. Adam Boczek
    Replies:
    4
    Views:
    4,323
    Adam Boczek
    Dec 5, 2004
  2. Ken Varn
    Replies:
    1
    Views:
    974
    Ken Varn
    Aug 19, 2005
  3. Charleees
    Replies:
    2
    Views:
    8,204
    Eliyahu Goldin
    Jun 20, 2006
  4. Ravichandran Mahalingam

    Bound Column or Template Column (w dAdapater?) in DataGrid

    Ravichandran Mahalingam, Jan 9, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    220
    Ravichandran Mahalingam
    Jan 9, 2004
  5. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    227
    Gregory Toomey
    Apr 23, 2004
Loading...

Share This Page