checkbox - vb.net get row index id by row or cell value -
hi trying index of row through value . tried code not working there way can indexof row value.
dim dgr new datagridviewrow() dgr.createcells(datagridview1, new object() {"name", "dfd", "sdfdf"}) datagridview1.rows.add(dgr) txtnameindex.text = datagridview1.rows.indexof(dgr)
i want add value , remove value check box when check box checked value should added in datagridviewd , when same check box unchecked value should removed datagridview
if chkbox.checked = true row = new string() {"2", "product 2", "2000"} datagridview1.rows.add(row) else value = new string() {"2", "product 2", "2000"} datagridview1.rows.remove(value) end if
this how index:
dim integer = datagridview1.rows.add(dgr)
or
dim integer = dgr.index
for checkbox code recommend top 1 since aren't creating object datagridviewrow.
Comments
Post a Comment