0

I create DataGridViewTextBoxCells and add them to my DGV.

I want to disallow any entry but 0..9 in all column 0 cells, and anything but 0..9 and "." in all of the others.

Which event should I use to enforce this: CurrentCellChanged? CellFormatting? Some other event? ...or some other way altogether?

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
  • How do you provide the data to the grid? Is it bound to a datasource? And do you mean how to stop users entering bad data, or how to not show certain values from the datasource? – David Hall Sep 24 '12 at 22:38
  • It's not databound; the users enter values directly. I just want to prevent them from entering anything other than integer vals in column 0 and decimals vals in all the other cells (col > 0). – B. Clay Shannon-B. Crow Raven Sep 24 '12 at 23:01

0 Answers0