TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
waffle
NA
48
0
adding unique items in listview
Apr 6 2007 3:46 AM
i have an ordering windows application. a product(including its quantity and price) is added to the listview when button is clicked. what i want to happen is when the product already exists in the listview, it will not add on the list but will just update the existing product info(quantity and price). how will i do this? i have this code for adding items in the listview... private void buttonAddItem_Click(object sender, EventArgs e) { ListViewItem pItem = new ListViewItem(listBoxItems.SelectedItem.ToString()); ListViewItem.ListViewSubItem sItem1 = new ListViewItem.ListViewSubItem(pItem, Convert.ToString(QuantityForm.quantity)); ListViewItem.ListViewSubItem sItem2 = new ListViewItem.ListViewSubItem(pItem, Convert.ToString(QuantityForm.quantity * Convert.ToInt16(labelItemPrice.Text))); pItem.SubItems.Add(sItem1); pItem.SubItems.Add(sItem2); listViewOrders.Items.Add(pItem); }
Reply
Answers (
1
)
How to create printer ports and install printer drivers using C#.net?
newbie help