Site Search:
Sign in | Join | Help
4Penny.net

ComponentArt

May 2007 - Posts

  • Iterating through Selected Items in a ComponentArt grid

    This post is similar to the last, but this time we have a check box column in the grid, and we want to loop through only the selected items.

    Dim griditem As ComponentArt.Web.UI.GridItem
    Dim strSopnumber As String
    Dim selectedItems As ComponentArt.Web.UI.GridItemCollection

    selectedItems = Me.gridex1.GetCheckedItems(Me.gridex1.Levels(0).Columns("selected"))

    For Each griditem In selectedItems

        strSopnumber = griditem("sopnumbe")

    Next

     

  • Iterating through a ComponentArt grid

    This blog will show how to loop (iterate) through a Component Art grid

    foreach(GridItem item in Grid1.Items)
      {
        Response.Write(item["ID"] + ": " + item["FullName"] + "<br />\n");
      }


    Dim griditem As ComponentArt.Web.UI.GridItem
    
    
    For Each griditem In Me.gridex1.Items 
    'code here
        'find an item in a server template
        chkSelect = CType(Grid1.FindControl(0, 0, griditem, "chkSelect"), CheckBox)
    
    
        'get a reference to a grid field
        intLineItemSeq = griditem("lnitmseq")
    
    
    Next