Is there anyway to tie a WebImageButton to a Validation group?
Whenever I click on my button it runs all the validation on the page and I only want it to validate a certain validation group?
sorry to x-post but....
Hi, you can implement ValidationGroups in the following way...
Add these two methods to your Masterpage/Page/Usercontrol (ie where the WebImageButton resides..
{
}
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "ValidateGroupOnClick",
and my button looks like this in Markup...
<igtxt:WebImageButton ID="YourWebImageButtonID" runat="server" Text="Add People Contact" AutoSubmit="true" CausesValidation="false" ><RoundedCorners HeightOfBottomEdge="2" HoverImageUrl="ig_butCRM2.gif" ImageUrl="ig_butCRM1.gif" MaxHeight="40" MaxWidth="400" PressedImageUrl="ig_butCRM2.gif" RenderingType="FileImages" WidthOfRightEdge="2" /> </igtxt:WebImageButton>
This seems to work. For what its worth, on examining the source code the reason why infragistis have not implemented the ValidationGroup property is because the WebImageControl does not implement the System.Web.UI.WebControls.IButtonInterface. Also, there are no actual server controls inside the WebImageButton that implement this interface that could host the ValidationGroup property, and consequently register it with the ASP validator jscript. So they chose not to bother. I guess this shows it would have been pretty easy to do. Next release maybe?
Cheers,
Nick
Unfortunately that is not supported.