c# - ListView different readings -


i have code called class mainform.

    public void add_to_reg(listviewitem tmp)     {          if (this.invokerequired)                 this.invoke(new action(() => add_to_reg_impl(tmp)));          else             add_to_reg_impl(tmp);     }      private void add_to_reg_impl(listviewitem item)     {         lst_reg.items.add(item);         lst_reg.refresh();         this.refresh();     } 

the problem items not added. if add debug.writeline(lst_reg); code above, shows me number of items raising.

but if put debug.writeline(lst_reg); in button called event shows me listview empty.

any ideas?


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -