I have a button in EmptyTempletField of gridview for which causevalidation property is set to false.
But when I try to add row in gridview from empty template field by clicking on that button, the button is not firing row command event. Moreover, it fires the validation. I have few validations which are grouped. But this button fires all validations irrespective of group. If I click on the button second time, then it fires the row command event. I can’t understand what is happening..
Why button fires validation which it is not supposed to fire…???
It is not clear what is exaclty happening with your code. Anyway, it should be something similar to this
And read this article about GridView.RowCommand, which is helpful
Hope this helps