We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Tabstrip, Toolbar, Postback and force validation

Thread ID:

Created:

Updated:

Platform:

Replies:

94618 May 24,2010 12:52 PM UTC Jun 1,2010 01:32 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: Tools
James Knowlton
Asked On May 24, 2010 12:52 PM UTC

I'm using a tabstrip with a toolbar inside each multi-view (used in conjunction with the tabstrip). I have not gotten around to switching the multi-page for the multi-view since verything is working.

The one problem I'm experiencing is the Toolbar performs a postback (as expected) but doesn't cause the validation controls to execute and "stop" the post back when they fail validation tests. I have an "Add", "Edit", "Delete", "Update" and "Cancel" button on the toolbar and only need the validation controls to execute when the "Update" toolbar item is selected. Is there anything equivalent to "CausesValidation" property or another method of running all validations and stopping the post back when they fail?

Thanks,

James.

Lakxman Kumar C [Syncfusion]
Replied On May 27, 2010 12:28 PM UTC

Hi James,

Thank you for your interest in Syncfusion Products.

Could you please provide us more information on what do you like to validate when the 'Update' toolbar item is clicked? Meanwhile, you can also try implementing the validations in the "ClientOnItemSelect" client side event of the Toolbar Item. If the validation fails, you can stop the postback by just returning 'false'. You can find more information of using them in the Online Sample in the link below

http://samples.syncfusion.com/ASPNET/8.2.0.18/Web/Tools.Web/samples/3.5/MenuPackage/Toolbar-BasicFeatures/ClientSideEvent/cs/ClientSideEvent.aspx?args=2

Kindly try the above and let us know if this works.

Regards,
Lakxman Kumar C

James Knowlton
Replied On May 29, 2010 07:05 PM UTC

An example of the problem is a Required Field Validator inside an EditItemTemplate of a DetailView control. The DetailView is inside a Multiview control. I have a toolbar that when clicked calls an sub routine in the code behind page using the OnClick="SubRoutineName" attribute. When I click the toolbar item the "OnClick" routine executes but none of the pages validation control execute. If I was using a CommandButton I could set the "CausesValidation" attribute to true and the page validates before the CommandButton's onClicked event executes.

I've worked around the issue but calling the Page.Validate() and then checking the Page.IsValid() property in the toolbar's onClick routine (only when the specific UPDATE toolbar item I'm interested in is clicked) and this works ok, but it seems to me that the toolbar item (since it posts back) should have the ability similiar to a command button to "cause validation" when clicked. I was just hoping there was a property setting I had overlooked.

Thanks,

James.

Lakxman Kumar C [Syncfusion]
Replied On June 1, 2010 01:32 PM UTC

Hi James,

We regret to let you know that currently we dont have this feature in our library. We have notified our Developer Team for further analysis of this feature.

Thank you for your interest in Syncfusion Products.

Regards,
Lakmxan Kumar C

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;