private void dgcommonproceduredetails_editingcontrolshowing(object sender, datagridvieweditingcontrolshowingeventargs e) { if (dgcommonproceduredetails.currentcell.columnindex == 0) { combobox cb = (combobox)e.control; cb.selectedindexchanged += new eventhandler(cb_selectedindexchanged); } else if (dgcommonproceduredetails.currentcell.columnindex == 1) { e.control.textchanged += new eventhandler(textchange); }
}
private void cb_selectedindexchanged(object sender, eventargs e) { combobox cb = (combobox)sender; datatable dtrate = probilllogic.getrate(cb.selectedvalue.tostring()); dgcommonproceduredetails.currentrow.cells[2].value = dtrate.rows[0][0]; }
public datatable getrate(string proic) { this. query ="select rate from proc_settings where return (this.dm.getdata(this.query)); }
procid=" + proic;