.net - How to dynamically change ListView color (skip one line) -


using vb.net , tried many times achieve couldn't worked.

i need achieve below on listview

dim myrow string    each myrow in listview      listview1.backcolor = color.blue    next

listview image

listview1

you can use mod operator.

    dim mylistview listview     dim myrow listviewitem     dim rowcnt integer = 0     each myrow in mylistview.items         if rowcnt mod 2 = 0             myrow.backcolor = color.blue         else             myrow.backcolor = color.gray         end if         rowcnt = rowcnt + 1     next 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -