c# - DataGridViewTextBoxColumn Tab Key Behavior -
i have datagridview organises student's points. when selected, can come in points via datagridviewtextboxcolumn. (the bluish cells).
i utilize next code command whether input numeric or not.
private void dgwpnotlar_editingcontrolshowing(object sender, datagridvieweditingcontrolshowingeventargs e) { e.control.keypress += new keypresseventhandler(checkkey); } private void checkkey(object sender, keypresseventargs e) { if (!char.iscontrol(e.keychar) && !char.isdigit(e.keychar) && e.keychar != 'g' && e.keychar !='m'&&e.keychar!='g'&&e.keychar!='m') { e.handled = true; } }
which want when finished entering points current cell, tab key take me next pupil point cell. tried implement code controls pressed key above, checkkey method not fired when press tab key.
any suggestions?
i think have insert "cellendedit" event datagridview properties!
with event can press "tab", "enter" or each button want.
i hope help you.
c# datagridview keypress eventargs
No comments:
Post a Comment