Results 1 to 2 of 2

Thread: ItemDataBound

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    ItemDataBound

    Hi,
    I am trying to set the visibility of the checkbox in each row of the grid.
    Do you see anything wrong in theis code which I am using in the ItemDataBound event?
    Thanks

    For Each oItem In grdSearch.Items
    If oItem.ItemType = ListItemType.AlternatingItem Or oItem.ItemType = ListItemType.Item Then
    'Search the file id here
    strFileIDCurrent = e.Item.Cells(3).Text()

    If strFileIDCurrent = mstrOldFileId Then
    CType(oItem.Cells(0).Controls(0), CheckBox).Visible = False
    End If
    mstrOldFileId = strFileIDCurrent

    End If

    intRow += 1
    Next

  2. #2
    Addicted Member
    Join Date
    Aug 2004
    Location
    Cape Town, South Africa
    Posts
    149

    Re: ItemDataBound

    If strFileIDCurrent = mstrOldFileId Then
    CType(oItem.Cells(0).Controls(1), CheckBox).Visible = False
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width