C# ListView Remove Items -


I would like to delete the item already because it shows only one item when I click on it, but here, the item Number 1 is not present and I do not know why I can solve it? Thank you. Private Zero DEXTarget_CheckedChanged (Object Sender, EventArgs E) {Log (marked "DEX (TMAPI) target"); ListView1.Items.RemoveAt (-1); PS3.ChangeAPI (SelectAPI.TargetManager); Var.API = true; } Private Zero CEXTarget_CheckedChanged (Object Sender, EventArgs E) {log (marked "CEX (CCAPI) target"); PS3.ChangeAPI (SelectAPI.ControlConsole); Var.API = False; }

log:

  Private zero log (string text) {Var.lst = this.listView1.Items.Add (DateTime.Now.ToString ( "DD / MM / OR HH: MM")); Var.lst.SubItems.Add (text); }    

list view starting with item index 0 and Calculate -1 .

I think you should try ListView

try this:

  listView1.Items.RemoveAt (listView1.Items .Count - 1);    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -