Announcement

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

    Need to show server side errors on grid

    Hi Iso,

    List grid has default error handling mechanism which displays field level validation errors but I am wondering if there is anything to show server ride row level errors. Ex- when I delete multiple rows from grid, I have few conditions at server side which I can not check on UI and on basis of these conditions some records might not get deleted but how can I show these errors on grid.

    We are thinking if there is anything to highlight the row and hover the errors would be good.

    Thanks,
    Ashish.

    #2
    Probably, the default behavior of showing a dialog with an error message is what you should use (just have an error message that details the problems with each record).

    However, if you want something else, you can add your own RPCManager.handleError() implementation, attach errors to the records by just adding them as normal JavaScript properties, and then show them via hover or via a custom formatCellValue() or both.

    Comment


      #3
      How can I implement default behavior (one detailed message showing problem with each record) as I do not get consolidated response from the server. It's a queue so records are processed one by one.

      For this I may need to change my implementation to send all records to server in single request and sending consolidated response. It there a way to implemented the default behavior even when I am using queue (I use queue and call updateData as I don't want records to be removed from grid as don't actually delete records but change their status to canceled).

      Comment


        #4
        So you want to not actually remove the deleted records from the grid, but just show them as deleted? Then yes, use updateData(), and you can return validation errors normally - just attach them to an arbitrary field.

        Comment

        Working...
        X