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. Image for the cookie policy date
close icon

Validation in GridDataBoundGrid control

Hi, In our application, we are using GridDataBoundGrid control. In CurrentCellValidating event we are validating the value that is entered. In the same screen we have other controls named OK, Cancel, Clear All and Delete buttons. Once the user enters invalid value and clicks on Clear All or Cancel button I need to perform some actions i.e no need to validate. But after entering invalid value, if he clicks on OK or Delete button, I should not allow the user to perform any other action. Validation should happen. Is there any property or method that can be used. Syncfusion version : 3.3 .Net framework version : 1.1 Regards, Prathima

4 Replies

AD Administrator Syncfusion Team July 4, 2006 03:47 PM UTC

Hi Prathima, Try setting the Clear All /Cancel button''s CausesValidation flag to false in the form''s load event. Here is a code snippet. this.Cancelbutton.CausesValidation = false; this.ClearAllbutton.CausesValidation = false; Description of CauseValidation: The value indicating whether the control causes validation to be performed on any controls that require validation when it receives the focus. Let me know if this helps. Best Regards, Haneef


PV Prathima Venkobachar July 5, 2006 05:36 AM UTC

Hi Haneef, Thanks. It works fine if the grid and other controls are placed in the same panel. In my screen, grid is placed in one panel and Cancel button is placed in another panel. Regards, Prathima. >Hi Prathima, > >Try setting the Clear All /Cancel button''s CausesValidation flag to false in the form''s load event. Here is a code snippet. > >this.Cancelbutton.CausesValidation = false; >this.ClearAllbutton.CausesValidation = false; > >Description of CauseValidation: > >The value indicating whether the control causes validation to be performed on any controls that require validation when it receives the focus. > >Let me know if this helps. >Best Regards, >Haneef > > >


AD Administrator Syncfusion Team July 5, 2006 03:23 PM UTC

Hi Prathima, Try setting the Panel''s CauseValidation property to false.Here is a code snippet. this.panel1.CausesValidation = false; this.Cancelbutton.CausesValidation = false; this.ClearAllbutton.CausesValidation = false; Let me know if this helps. Best Regards, Haneef


PV Prathima Venkobachar July 6, 2006 11:42 AM UTC

Hi Haneef, Thanx a lot. It works fine. Regards, Vanitha >Hi Prathima, > >Try setting the Panel''s CauseValidation property to false.Here is a code snippet. > >this.panel1.CausesValidation = false; >this.Cancelbutton.CausesValidation = false; >this.ClearAllbutton.CausesValidation = false; > >Let me know if this helps. >Best Regards, >Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon