Validating textbox in gridview
To meet the first requirement add a required field validator to ddl Country drowdownlist.For the second requirement, I need to add an onchange Event to the dropdownlist.Recently I had to have a Drop Down List for selecting a country inside a gridview, the country dropdownlist contains several items including an item with the text "Other".When "Other" is selected, a textbox should show up where in the user can provide the rationale for selecting "Other".total1b), I want to add (sum) those text box values without ''ADD Button'' .is possible to add the text box values ? So if you don't want to validate ISNUMERIC on server side, you can always use some scripting on client side.Some times we find it necessary to provide custom validation to controls inside a Grid View.Then Text Boxes will be automatically added to your Grid View for you when a new item is added to it's data source.
Both those controls are included in a templatefield in the Grid View Leaving out the databinding details.
When editing the validator triggers but it doesn't show me any message.
It goes through the validate method twice, and each time it comes out false it just doesn't do the update.
In this textbox I have assigned a dummy css class, you can also use the class.
In each Text Box I am calling a Java Script function called "Number Filter" during the client-side "onkeydown" event.