| Author: Deepika Haridas 01 Jan 2009 | Member Level: Diamond | Rating: Points: 1 |
Hi,
Check this link
http://msdn.microsoft.com/en-us/library/ms972948.aspx
Thanks & Regards, Deepika Editor
If U want to shine like a SUN..First U have to burn like the SUN!! Need a Guide? Join my mentor program..
|
| Author: Ranish 02 Jan 2009 | Member Level: Bronze | Rating:  Points: 2 |
private void dgdSubject_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { TextBox innerTextBox;
if (e.Control is TextBox) {
innerTextBox = e.Control as TextBox; innerTextBox.KeyPress += new KeyPressEventHandler(innerTextBox_KeyPress); } }
private void innerTextBox_KeyPress(object sender, KeyPressEventArgs e) {
if (!Char.IsControl(e.KeyChar)) { if (Char.IsDigit(e.KeyChar)) { if (Convert.ToInt16(((TextBox)sender).Text + e.KeyChar.ToString()) >= 10) { e.Handled = true; } } else { e.Handled = true; }
}
}
|
| Author: sreejith 02 Jan 2009 | Member Level: Gold | Rating:  Points: 0 |
If I am having more than one textbox then what ll i do?
|