VB.NET - DataGridView Question - Formatting data as it's being typed
Asked By Al on 20-Aug-14 04:51 PM
I want to add "-" (dash) in a number as it's being typed in a cell in datagridview control.
For example, as a user is entering a SSN, I'd like to not make the user enter the "-" separator.
I have looked around and can't find something that will help me with this. Can I get some help, please?
Robbe Morris replied to Al on 20-Aug-14 04:55 PM
You'll need to do this in JavaScript.
http://stackoverflow.com/questions/7685175/autoformat-ssn-while-entering-the-number
In the onload or document load of the page, you'd need to iterate through all of the applicable textboxes on your grid and initialize the jquery .keyup event on each one.