Hello guys,
First of all sorry for my bad english.
Is there any way how to calculate in listwiev?

I have a list view with two columns, ID and Number, using searching from text box.

SEARCH BUTTON




     foreach(ListViewItem ID in listView1.Items)

                    {
                        if (search.Text == ID.Text)

                        {




    ADD BUTTON








     ListViewItem ID;
                            ListViewItem.ListViewSubItem Num;
                            ID = new ListViewItem();
                            ID.Text = textBox1.Text;

                            Num = new ListViewItem.ListViewSubItem();
                            Num.Text = textBox2.Text;
                            ID.SubItems.Add(Num);
                            listView1.Items.Add(ID);

Every ID have Specific number(column)

If i found mathes by ID how i can calculate with the number on the same row.
For example
ID: Alex , Number: 100
ID: John, Number: 50

If i type Alex to text box how i can calculate with Alex number?
Thanks so much

Edited 2 Years Ago by MartinSoukup

Hi, you may try accessing that particular coulmn of the ListView so as to get access to that number which you are referring to.

This article has been dead for over six months. Start a new discussion instead.