Announcement

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

    How do I use Hilites in a Picklist?

    Using SmartClient 8.3. I've got a picklist on a form that I'm trying to apply hilites to the grid that pops up for the user to choose from. From the documentation, it would appear that this is just a listGrid, so I was under the impression that I could set pickListProperties, and add a property for hilites:

    Code:
                pickListProperties: {
                    hilites: [{
                        criteria: {
                            fieldName: "Obsolete",
                            operator: "equals",
                            value: true
                        },
                        cssText: "color:#999999;"
                    }]
    }
    But it doesn't do anything. I can put other things in pickListProperties, such as rowHover, and that works just like it should for a listGrid.

    What am I doing wrong here? Shouldn't this work?

    #2
    You need to set _constructor:"AdvancedCriteria" so that the criteria are not treated as simple Criteria (which would be looking for records that had properties like fieldName:"Obsolete", operator:"equals", etc).

    Comment


      #3
      Still doesn't work

      Thanks, but that still does not seem to work. I have tried multiple ways of using criteria, and have even tried no criteria at all. It acts as if the grid just refuses to apply any hilites to itself at all. Even when using the listgrid's own editHilites() function, no hilites work on that grid at all. I've even tried markForRedraw() after hilitesChanged. Still no dice. It's like hilites just refuse to work on a listGrid that is used as a picklist.

      My current pickListProperties looks like this:
      Code:
                  pickListProperties: {
                      hilites: [{
                          criteria: {
                              _constructor:"AdvancedCriteria",
                              fieldName: "Obsolete", 
                              operator: "equals",
                              value: true
                          },
                          cssText: "color:#ff9999;"
                      }]
                  },
      Is there something else I should be looking for?

      Comment

      Working...
      X