tonifirnandes
Member
- Joined
- Mar 7, 2013
- Messages
- 20
- Programming Experience
- 1-3
Hello All the best programmer,
Good Morning and Sorry for disturbing.
i have some problems all, hopely you would like to help and could help me thanks. my problem is :
i need validate or check the data or value in datagridview cell before it update to the database, so i can check if the user input data correctly or not.
i just would like to check, the type data that user input to the cell, is that matching to the sqldatatyp or not.
i just tried to use this code below :
Object.ReferenceEquals(DataGridView1.CurrentCell.Value.GetType(), SqlDbType.VarChar) to check if the type of the cell is the same with the type to the database.
but i always get wrong, i geuss that if the type in datagridview cell is not same with sqldbtype so it always get not same.
hopely you would understand about that, and i need your help thanks.
regards.
Good Morning and Sorry for disturbing.
i have some problems all, hopely you would like to help and could help me thanks. my problem is :
i need validate or check the data or value in datagridview cell before it update to the database, so i can check if the user input data correctly or not.
i just would like to check, the type data that user input to the cell, is that matching to the sqldatatyp or not.
i just tried to use this code below :
Object.ReferenceEquals(DataGridView1.CurrentCell.Value.GetType(), SqlDbType.VarChar) to check if the type of the cell is the same with the type to the database.
but i always get wrong, i geuss that if the type in datagridview cell is not same with sqldbtype so it always get not same.
hopely you would understand about that, and i need your help thanks.
regards.