Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Error Message For - Wrong Datatype

Status
Not open for further replies.

Mahey

Programmer
Dec 24, 2008
52
SA
I have a datatble with datagridview

dim my_table as new Datatable
my_table.columns.add("Srl_no",type.gettype("system.int32"))
my_table.columns.add("Employee Name",type.gettype("system.string"))
my_table.columns.add("Basic_salary",type.gettype("system.decimal"))

datagridview1.datasource=my_table

now when the users enter their data in datagridview, "basic_salary" column, suppose if they press instead of numbers any characters,
then I want to display a message

"Invalid Key Pressed - Basic Salary should be numerals" like wise
how to do that?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top