Hi,
I am having a problem with the combination of gridview's select command and controls validation.
I have enabled (row) selection for a gridview which automatically generates a (select) link control. I have also a textbox control contained in the gridview's template field with a validation control attached to it.
The problem is that validation is not performed on the client side when the row selection link is clicked and a postback occurs even though CausesValidation property for the link is set to True by default and I set it to True explicitly <asp:CommandField ShowSelectButton="True" CausesValidation="True"/>.
I also have <asp:ButtonField CausesValidation="True" Text="Button" /> in my gridview that really causes validation on the client side before a postback but I would like to keep the row selection command to access the gridview's SelectedValue property. On the other hand, I need validation as well.
When moving the mouse over the two mentioned links I see that they call two different JavaScript functions, with <asp:CommandField ShowSelectButton="True" CausesValidation="True"/> calling _doPostBack apparently without validation on the client side. Maybe there is a way to force validation on the client side before all postbacks? Otherwise, to keep validation, I will probably have to extract which row was selected from the request object.
Viktors