This is a migrated thread and some comments may be shown as answers.

[Solved] Validation control and the Panel Bar

4 Answers 132 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Rhyss
Top achievements
Rank 1
Rhyss asked on 12 Jun 2008, 06:44 AM
Hi All,

i was just wondering how validation is supposed to work with the Panelbar.  What i have is
  • a toolbar with a Save button on it.
  • a Panelbar with numerous items with textboxes etc

What i want it to do is have it so when i click on Save in the toolbar it first checks if all the controls are validated in the Panel bar and if not focus on the first control not found.
Even better is if this validation could occur on the client side before postback.

I tried to set it up as per the example in the demo of the Toolbar using the ValidationGroups but it doesn't work as i suppose the Validators in the Panel Items aren't visible to the Toolbar.

I can explicitly fire the Validator using the demo example in the Panelbar validation section, but i don't want to post back if i can help it.

any ideas?
Jordan

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Jun 2008, 11:46 AM
Hi Jordan,

Go through the following demo link.
Validation Group

Thanks
Princy.
0
Rhyss
Top achievements
Rank 1
answered on 12 Jun 2008, 11:15 PM
Thanks Princy, but i've already gone through all this.
It does the opposite of what i want to do.  This validates external to the panelbar.  I am validating to controls IN the panelbar from an external toolbar.

any ideas?
0
Rhyss
Top achievements
Rank 1
answered on 15 Jun 2008, 06:44 PM
Anyone?
0
Veselin Vasilev
Telerik team
answered on 16 Jun 2008, 03:40 PM
Hello Jordan,

I have created a simple page with toolbar and panelbar on it.
I have placed a textbox and a required field validator on the first panel item.
Save button of the toolbar has CausesValidation set to True, while New and Open have set to False.
When you click on the Save button - the validator validates the textbox.

I do not use ValidationGroups and all is working fine.

Please download the project and let me know what is different in your case.

Sincerely yours,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
PanelBar
Asked by
Rhyss
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rhyss
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or