Hi
Thanks for all the previous answers/suggestions!
I am using UltraWinGrid and set its column type/regex at run time based on some data in database. So, when the user inputs, the validations looks good. When I try to bind a datasource(which I get from Excel), the validations doesnt happen. Should I seperately valdiate each cell or is there a way I can force the wingrid to valdiate the cells based on its column type/regex.
Thanks again.
Hi,
The validation in the grid is for validating user input. It is, after all, a user interface control. It's really not designed to validate the data in the data base. Theoreticaly, the data in the database should have been validating before it got in there. :)
If you want to validate your data that is already in the database, then there's really no reason why you should do that through the grid. It would be more efficient to simply loop through your data and validate it in code.
I am trying to import the data from Excel. User could have changed the data in excel and try to import to the Wingrid. In the import, I create the datatable by looping thorugh each cell. I guess I should validate each cell during the import. As you said, the data in the database is validated thorugh the UI before it was saved in the DB.
But shouldnt there be a way to force validation instead of doing it only when the user inputs and the cell loses focus?
Thanks