subitem

C# - Update a subitem within a listview

I am working on an application where users enter information that is then added to a listview. That works great. The only problem is, the application connects to a web site that updates the "Points" field in that listview for each account. I am not sure how I can update a single subitem within a listview. Here is an example screensho...

C# - How to get/set ListViewItem or ListViewItem.ListViewSubItem by key ?

I have a listview with several items that are created dynamically, each has two subitems that are quantity and code after a query to the database should update the quantity, but to make the code more readable I would like to access subitems by the key and not by its index, something like: subitem["quantity"] but I don't see how to assi...

How to edit a selected SubItem programmatically?

Does anyone know how can I edit a subitem on a listView? I've tried using this: ListView1.SelectedItems[0].SubItems[1].Text = "Hello?"; But that doesn't work. I get the error "InvalidArgument=Value of '1' is not valid for 'index'". I've got two columns on the listview, so I figured the index of [1] would be the subitem. ...

Get SubItem value when double-clicking on Item in ListView

Hi All I have a listview with 2 columns, and when the I double click on an item, i need to display the value of its corresponding sub item in a TextBox control. How can I do this? I searched Google, but it didn't return anything helpful, probably because I'm not exactly sure what to search for. Thank you ...

WPF ContextMenu lose its subitems

Hi guys, I've got a weird issue with WPF contextMenu regards updating the UI! Basically I create a hierarchical list named World. this list contain Countries and each country contain Cities. I bind this list to a label contextMenu. I create a button which delete one city in that list. Here the code ` <Window.Resources> <Hiera...

How to change the backcolor of a listview subitem using its own value

Hi, How can I programmatically change the back color of a single cell in a listview using its own value? The values in the ColorFlag Column Came from the database. Here is my code: foreach(DataRow dr in _dataTbl.Rows) { _markOW = dr["Mark"].ToString(); _stock = dr["Stock"].ToString(); _S...

C# listView check for repeated "fileName" entries.

Hi guys, I am new to C# I just want to ask if is it possible to check against a SUBItem in a listview for repeated values before i do a ADD() method?? Lets say i have a listview and i can add/delete items I can have numerous items and subitems I would like to perform a check before adding the file that i'm opening into the listview...

did anyone know why the prg shows no subitem ?

the listview shows in this test no subitem, the base is net cf 3.5 and wm6. and i become no error and no subitem but why Dim i As Integer For i = 0 To 3 Dim item As New ListViewItem piclist.Images.Add(getuserpic(Mainform.nickname_1.ToString, Mainform.mainurl)) item.ImageIndex = i item.Text = "tester...

C# Listview adding subitems

This is WinForms.. I have a for loop: private void MagicBtnClick(object sender, EventArgs e) { foreach (var auras in GetBuffs()) { var i = new ListViewItem(auras.ToString(), 0); listView1.Items.AddRange(new[] { i }); } } I want to add a simple Subitem(I get the value from a textbox) to a selected item on the list...