c# - Select programmatically a row of a Listview -


i don't work select row of listview @ beginning of program.

        if (listview1.items.count > 0)         {             listview1.items[0].selected = true;             listview1.items[0].focused = true;         } 

after running snippet first item selected , focused.

listview1.items[0].selected true  listview1.items[0].focused  true 

after clicking manually item in listview can walk thru list with

listview1.items[newposition].selected = true; 

regards

set listview1.hideselection=false , listview1.focus()


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -