vb.net - Rows Not Highlighting in Data Grid View -


i have simple selection form displays datagridview , allows user select record process. have short sub routine loops through dgv , highlights rows based on date comparison dictionary when form loads. works great first time open form, on subsequent form opens, grid doesn't highlight. when step through code looks rows should highlighted, when form displays, nothing highlighted.

here code i'm using. cannot figure out why doesn't work. there better, more reliable way accomplish this?

for each row datagridviewrow in dgvpending.rows     each pair in dpending         if row.cells.item("id").value = pair.key             if row.cells.item("last_updated").value > pair.value                  row.defaultcellstyle.backcolor = color.blanchedalmond              end if         end if     next next 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -