View Single Post
Old 09-02-2011, 08:29 PM  
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
am i doing this correctly, trying replace the pre-loaded entries from your example with my actual listboxs for loading/processing

Code:
List<string> listId = new List<string>();
foreach(var item in this.listId.Items)
{
    listId.Add(item.ToString());
}
List<string> listCell = new List<string>();
foreach(var item in this.listCell.Items)
{
    listCell.Add(item.ToString());
}


int listCellCounter = 0;
            for (int x = 0; x < listId.Count; x++)
            {
                Debug.WriteLine("something " + listId[x] + " " + listCell[listCellCounter]);
                if (listCellCounter == listCell.Count() -1)
                {
                    listCellCounter = 0;
                }
                else
                {
                    listCellCounter += 1;
                }
            }
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote