I've a little Problem with a Tabcontainer with 2 Tabpanels.
In the first Tab I have three textboxes to make database entries. All of them with a requiered field validator. On 2nd tab I have a gridview to display the data.
My problem is when I want to make updates in my gridview I have to go the first tab and type something in the three textboxes otherwise I can't update because of the requieredFiledValidators.
Define ValidationGroup (you will get them in the property window of the controls) for the controls and the RequiredFieldValidators and also (i guess there is a button somewhere) for the button, keep the three textboxes and the button in the same ValidationGroup
and the GridView in a different. That will resolve the issue.
r0cka
Member
10 Points
8 Posts
RequiredFieldValidator and TabContainer
May 28, 2007 09:38 AM|LINK
Hello everybody,
I've a little Problem with a Tabcontainer with 2 Tabpanels.
In the first Tab I have three textboxes to make database entries. All of them with a requiered field validator. On 2nd tab I have a gridview to display the data.
My problem is when I want to make updates in my gridview I have to go the first tab and type something in the three textboxes otherwise I can't update because of the requieredFiledValidators.
Does anybody has a workaround for this problem?
Thank you very much
Philipp
r0cka
Member
10 Points
8 Posts
Re: RequiredFieldValidator and TabContainer
May 28, 2007 10:37 AM|LINK
I solved by myself.
I just added the property CausesValidation="false" to the <asp:commandfield> [:)]. Works great.
Philipp
addie
Participant
1562 Points
291 Posts
Re: RequiredFieldValidator and TabContainer
May 28, 2007 10:39 AM|LINK
Define ValidationGroup (you will get them in the property window of the controls) for the controls and the RequiredFieldValidators and also (i guess there is a button somewhere) for the button, keep the three textboxes and the button in the same ValidationGroup and the GridView in a different. That will resolve the issue.
r0cka
Member
10 Points
8 Posts
Re: RequiredFieldValidator and TabContainer
May 28, 2007 11:21 AM|LINK
Yeah that's definitly a better solution for my case. Thank you addie!
Philipp