Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

C# Winfroms Listview

$
0
0

Help. Hi, i am transferring textboxes value to listview, txtbox1 = Product, txtbox2 = Quantity , txtbox3 = Price, and i've done it correctly. Now, if the product is the same, the quantity should add and also the price,  i mean there should no duplicates inside the listview, Need help guys

This is my code 

        private void AddtoList(String Product, String Price, String Quantity)
        {
            String[] row = { Product, Price, Quantity };

            ListViewItem item = new ListViewItem(row);

            listView1.Items.Add(item);

        }


        private void btnAdd_Click(object sender, EventArgs e)
        {
           


                    AddtoList(txtProd.Text, txtPrice.Text, txtQuant.Text);

       }


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>