c# datagridview checkbox check if other column value is 0 -


i have datagridview checkbox column(header: status) , textbox column(header: quantity). want check automatically checkbox column if quantity 0.

enter image description here

loop through rows if datagridview this:

foreach (datagridviewrow row in datagridview1.rows) {     //check column 3 quantity             if (row.cells[3].value.tostring() == "0")     {            //get checkbox in column 1 , cast checkbox         datagridviewcheckboxcell cell = row.cells[1] datagridviewcheckboxcell;              cell.value = cell.truevalue;     } } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -