Click here to Skip to main content
16,014,892 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi there.

Im doing a Windows Desktop Application using c#.

I have a DataGridView with 5 columns namely(MarkType, Mark1, Mark2, Mark3, Mark4) and it allows a user to enter two digit marks per 'MarkType'.

I need to format All Mark Cells to only allow two digits and no alphabetical letters.
I also need to retrieve those marks directly after they've been added and not on a save button.

I tried
C#
int mark1=Convert.ToInt32(this.datagridview.CurrentRow.Selected.ToString());
to get the mark upon CellLeave_Event but doesn't work.

Any Help would do.

Regards
Posted
Updated 23-Sep-11 3:09am
v2

1 solution

Have you ever heard about this: O0o
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900