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

Seems to me you would be better of with a DataGridView. Example.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.