G
Guido Pederzini
Hi all,
my problem is in the validation of a textbox in a gridview. I have to check
a quantity that must be a positive number greater than zero.
In the XML I have used in a ItemTemplate a TextBox with
1) RequiredFieldValidator (for the existence)
2) CompareValidator (for the positive number)
3) RegularExpressionValidator (it's must be a number)
The problem is that when I fire the "OnClick" event , all the textbox in the
gridview display the error message associated to the failed validation, and I
want that only the row in which I have clicked display it.
I've found a workaround, in the code behind i check all the rules and I
display an alert with Javascript, but I would know if it's possible to
control, with the asp.net validator, only the row that fired the onclick
event.
Any help will be appreciated. Thanks!
Guido Pederzini
my problem is in the validation of a textbox in a gridview. I have to check
a quantity that must be a positive number greater than zero.
In the XML I have used in a ItemTemplate a TextBox with
1) RequiredFieldValidator (for the existence)
2) CompareValidator (for the positive number)
3) RegularExpressionValidator (it's must be a number)
The problem is that when I fire the "OnClick" event , all the textbox in the
gridview display the error message associated to the failed validation, and I
want that only the row in which I have clicked display it.
I've found a workaround, in the code behind i check all the rules and I
display an alert with Javascript, but I would know if it's possible to
control, with the asp.net validator, only the row that fired the onclick
event.
Any help will be appreciated. Thanks!
Guido Pederzini