Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validate a textbox value against boundcolumn value
Message
General information
Forum:
ASP.NET
Category:
WebForms
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01052559
Message ID:
01052563
Views:
7
>How do I validate the data entered into a textbox in a cell against the value of a boundcolumn of the same row? I want to make sure the value entered in the textbox is evenly divisible by the value in the boundcolumn.

You can use the Validating event for the cell (or column) that you are editing in. The binding manager should know which row you are in in the dataset (or rather the datatable in the dataset or just the datatable). Then do your math and if the math doesn't make you happy you execute e.Cancel = true and focus goes back to that cell.

Hope that helps

Einar
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform