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
Post a Comment