DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   listview looping (http://www.daniweb.com/forums/thread160683.html)

cVz Dec 4th, 2008 5:05 am
listview looping
 
Sup ladies and gentlemen, please help me, i need to loop through the listbox, now here's what i have


foreach (ListViewItem ListItem in listView_Replacement.Items)
                {
                    // finding the string in the current item rows
                    string m_findText = listView_Replacement.Items[0].Text;
                    string m_replaceText = listView_Replacement.Items[0].SubItems[1].Text;

                    string m_Messagetext = txtMessage.Text;

                    string m_MessageTextNew = txtMessage.Text.Replace("" + m_findText + "", "" + m_replaceText + "");

                    txtMessage.Text = m_MessageTextNew;

                    txtMessage.Refresh();
                }

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

cVz Dec 4th, 2008 5:56 am
Re: listview looping
 
nevermind , got it


All times are GMT -4. The time now is 6:00 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC