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
665
Validate user input on wingrid
posted

How does one go about validating that a user has entered a value into a grid cell ( in otherwords no null values)?  I cannot find any examples in regards to this.

Thanks ahead of time.

Patrick

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Patrick,

    There are any number of ways you could do it depending on the behavior you want.

    Typically, if you don't want to allow nulls in a particular field, your data source would handle this. A DataTable or UltraDataSource both have properties on the column object which determines whether null is allowed.

    But, if you want to do your validation in the grid, you could do it using the UltraWinValidator component. There's a sample of this component in the NetAdvantage SDK.

    Another option would be to handle an event of the grid such as BeforeCellUpdate, BeforeRowUpdate, or BeforeExitEditMode.

Children
No Data