Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
How to validate empty cells in wingrid
posted

I have a wingrid on my form.  Before I save the data to the database I need to see if the required fields in the grid are filled out and not blank or empty. 

Is there an easy way to do this other than looping through all the rows and cells? 

I'm on Infragistics 6.3.

Thank you,

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Tammy,

    I assume that any date provided by the application is already valid, so you only need to validate the user's data. You could do this in a number of ways. You could use the BeforeCellUpdate event, for example, and validate that required cells are not left empty. You could also use BeforeRowUpdate if you prefer to validate a whole row at once instead of individual cells.

    Of course, if you want to let the user enter blanks and then validate them only at the end when they are about to be written to the database, then you would have to loop through all of the grid rows and cells at once.

Children