validate datagridview column
how can we validate numeric values in datagridview column?or can we show a default value (say 0) in a column of datagridview? Need help in this matter .
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
meliPosted May 26, 2009, 6:31 PM
Do you mean you want to make sure that it's 0 (zero) not o (letter o)?
If that the case, you can try to convert it to int using:
Convert.ToInt32(row.cell[1].ToString())
It will fail if the value is other than digit.
Rodick WuPosted May 26, 2009, 1:28 AM