listview looping

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 135
Reputation: cVz is an unknown quantity at this point 
Solved Threads: 7
cVz's Avatar
cVz cVz is offline Offline
Junior Poster

listview looping

 
0
  #1
Dec 4th, 2008
Sup ladies and gentlemen, please help me, i need to loop through the listbox, now here's what i have

  1.  
  2. foreach (ListViewItem ListItem in listView_Replacement.Items)
  3. {
  4. // finding the string in the current item rows
  5. string m_findText = listView_Replacement.Items[0].Text;
  6. string m_replaceText = listView_Replacement.Items[0].SubItems[1].Text;
  7.  
  8. string m_Messagetext = txtMessage.Text;
  9.  
  10. string m_MessageTextNew = txtMessage.Text.Replace("" + m_findText + "", "" + m_replaceText + "");
  11.  
  12. txtMessage.Text = m_MessageTextNew;
  13.  
  14. txtMessage.Refresh();
  15. }

Now obviously those values should not be [0] and [1] because i am looping , but can anyone give me any idea what to put in there ???

Thank you in advance

CvZ
Delphi & C# programmer deluxe...
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 135
Reputation: cVz is an unknown quantity at this point 
Solved Threads: 7
cVz's Avatar
cVz cVz is offline Offline
Junior Poster

Re: listview looping

 
0
  #2
Dec 4th, 2008
nevermind , got it
Delphi & C# programmer deluxe...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC