Hi Dears
I want check the value of my gridColumns , I want user only type digit, I don't want let user to type any thing else except digit
How I can check it? and in which event I have to write this codes?
darab
-4
Junior Poster in Training
Recommended Answers
Jump to PostYou can try this snippet
Jump to PostYes I know it's code for a TextBox. But it should be easily adapted to a DataGridView, because when you are editing a cell in the grid you are working with a textbox.
Jump to PostDanny is right but it creates a repository textbox on the fly and I can't find the event to hook in for this. You could also handle the cell validation event:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; …
Jump to PostI don't understand what you're saying.... please clarify
Jump to PostPlease mark this thread as solved if you have found an answer to your question and good luck!
I spent a lot of time on this thread :P
All 18 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
darab
-4
Junior Poster in Training
ddanbe
2,724
Professional Procrastinator
Featured Poster
darab
-4
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
darab
-4
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
darab
-4
Junior Poster in Training
darab
-4
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
Dajer
0
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
Dajer
0
Junior Poster in Training
darab
-4
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
sknake
1,622
Senior Poster
Featured Poster
darab
-4
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
Dajer
commented:
thx alot.
+1
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.