0

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 by MartinSoukup

3
Contributors
2
Replies
25
Views
3 Years
Discussion Span
Last Post by KM499
1

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.