Announcement

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

  • Is there any way to highlight a cell in a List Grid based on some event.

    My use case is that I have a list grid handler of type RowEditorExitHandler, and in this, I send the List Grid Record data to the server side for backend validation and from there I get the column numbers which have errors. So, in the handler's lambda expression, I have ListGridRecord, the row number of the Row updated and column numbers which I obtained from the backend. Now, is there any way to reach out to those cells which the row number and column number point to so that I can do custom operations?

  • #2
    You seem to be re-inventing features that are already built in. If you define a validator that requires a trip to the server, such as a "serverCustom" validator, the ListGrid will automatically send a request to the server, perform the validation, return with errors if any and display them, as well as clear them automatically if the validator later passes. The same validator will also work the same way in forms.

    Comment


    • #3
      Thank you for the quick response but this "serverCustom" validator doesn't serve the purpose. We want to do custom operations at the cell level. Again, is there any java class or any API for Grid Cells like we have one for Row (ListGridRecord) that we can access using row number and column number and do operations upon like set css styling, enable/disable, highlight etc.

      Comment


      • #4
        serverCustom validators are per-cell, so again it seems like you are re-inventing something the framework already provides.

        It's not clear what you're asking about a per-cell API - there are a lot of them, all well documented. For example, you could implement getCellCSSText() as one of several ways of affecting styling on a per-cell basis.

        Comment


        • #5
          I am sending one grid record to the back-end for validation once user tabs out from that grid record and from backend I get a list of column numbers with validation severity level and respective error messages to show on them. Based on severity level I want to highlight the columns in different colors and also want to show those error messages on cell hover. I have achieved the part where I am receiving the validation severity level and error messages but don't know how to highlight those cells based on different severity levels and how to show error messages on cell hover as my cells are already drawn. This getCellCSSText work on each cell hover but I don't want to execute this method on each cell hover.
          Last edited by preeti_kanyal; 16th May 2018, 20:57.

          Comment


          • #6
            So again, this should be implemented as normal validators, or you will end up spending a lot of time replicating built-in features.

            As far as styling to show your notion of levels of severity, again, getCellCSSText() is one of several documented APIs for affecting styling, and refreshRow, refreshCell and redraw are ways of causing cells to be updated if there is not already automatic handling of this (as there is with validation errors).

            Comment


            • #7
              This wishlist post might be related.

              Best regards
              Blama

              Comment

              Working...
              X