943,688 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 641
  • C# RSS
Dec 4th, 2008
0

listview looping

Expand Post »
Sup ladies and gentlemen, please help me, i need to loop through the listbox, now here's what i have

C# Syntax (Toggle Plain Text)
  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
Similar Threads
cVz
Reputation Points: 29
Solved Threads: 7
Junior Poster
cVz is offline Offline
139 posts
since Mar 2008
Dec 4th, 2008
0

Re: listview looping

nevermind , got it
cVz
Reputation Points: 29
Solved Threads: 7
Junior Poster
cVz is offline Offline
139 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: CSS and Ajaxa Accordion
Next Thread in C# Forum Timeline: using in lass StringBuilder





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC