Validating input Datagrid
C#
2
Posts
2
Posters
0
Views
1
Watching
-
i designed a form using datagrid to connect to database. It allow user to enter data but i can not validate the data that user provide. Please help as posible as you can. Thanks. Mr Duc Linh Nguyen
There are many ways you can do this. One way is to handle the
TextBox.Validating
event (inherited fromControl
) of theDataGridTextBoxColumn.TextBox
property, which gets theTextBox
that is hosted when the cell is in edit mode. If you wanted to validate input as they type, handle theKeyDown
event of theTextBox
as well.Microsoft MVP, Visual C# My Articles