c# - DataGridView current cell jump to last column -


when add code method current cell changed , goes last column in current row

decimal value = 0; var flag = decimal.tryparse(dgv_projectseason.rows[e.rowindex].cells[e.columnindex].value.tostring(), out value); if (flag) {     setpercentofvalue(convert.todecimal(value)); } 

and method setpercentofvalue is

private void setpercentofvalue(decimal value) {     txt_depositprice.text = math.round(((decimal.parse(txt_depositpercent.text) / 100) * value)).tostring();     txt_contractorinsuranceprice.text = math.round(((decimal.parse(txt_contractorinsurancepercent.text) / 100) * value)).tostring();     txt_employerinsuranceprice.text = math.round(((decimal.parse(txt_employerinsurancepercent.text) / 100) * value)).tostring();     txt_forcetaxprice.text = math.round(((decimal.parse(txt_forcetaxpercent.text) / 100) * value)).tostring();     txt_increasevaluetaxprice.text = math.round(((decimal.parse(txt_increasevaluetaxpercent.text) / 100) * value)).tostring(); } 

i have use method. how can fix it?


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -