Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Emulating BatchUploader validation

    Hi,

    We are building a UI similar to the BatchUploader. When the SmartGWT BatchUploader loads data and renders it in its ListGrid, it shows error icons next to the fields that are empty/invalid/etc.

    We have a ListGrid that we load data that was populated into the database *not* via the UI (and doesn't have the same DataSource validation on input). It's possible that this data is invalid and I'd like to have our perform the DataSource's validation on each cell. Is there a way to programmatically invoke a validation against the ListGrid (or each row or cell) so that each errant cell similarly shows an error icon?

    Thanks!

    #2
    By default, data that comes from the server is assumed automatically valid, and only changes are checked. So one way to do this would be to load the data normally, but then use setEditValues() on each row to effectively make all the data into unsaved edits. Then it will be checked client and server side on attempted save.

    Comment


      #3
      Interesting idea. I'll try that, thanks.

      Comment

      Working...
      X