Question validating input in DataGridView?

sheenitmathew

Member
Joined
Feb 4, 2013
Messages
9
Programming Experience
5-10
Dear All

I am so happy about this web site and its forums, since I get perfect answers to my doubts. Thanks to all and special thanks to Ian who helped me several times.

I use VB.NET 2010.

Now I have a problem with DataGridView control. I need to add test details of students to the grid. There are four columns- Test Date, Time, Status and Comments. The types are Test Date-CalendarColumn, Time-TextBoxColumn, Status-ComboBoxColumn, Comments-TextBoxColumn. The combo box contains four items: Appearing, Passed, Failed, Absent.

My requirements:

1. When the user add data first time, they should only be able to select Appearing and once the Appearing is selected, they should not allowed to add another row.
2. When the user changes the status to Passed then also no new rows should be allowed.
3. If the user selected Absent or Failed then they can add new data.
4. This time also they should only be able to select Appearing And the date selected should be greater than any previous dates.
5. The user, in any case should not select a past date.
7. While editing, the user should not be allowed to edit any previous rows. (Editing should be enabled for the last row only, but can delete any rows.)
6. Finally, the user can only insert a maximum of 4 records.

I am tired working on this, please help me to solve this.

Thank you.
 
Back
Top