Announcement

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

    How To: TableGrid with DropDown with specific to the row

    I was hoping somebody has done this before:

    - I have a table showing rows. One of the columns is a ListGridField showing a drop down list with a small set of types. Each row in the table can/will show a different set in this drop down list...

    How would I go about doing this?

    #2
    Solution

    I figured it out.

    Code:
        SelectItem ddList = new SelectItem();
        ddList.setAddUnknownValues(false);
    
        identifierField.setEditorType(ddList);
        identifierField.setEditorValueMapFunction(new EditorValueMapFunction()
        {
          @Override
          public Map getEditorValueMap(Map values, ListGridField field, ListGrid grid)
          {
            Map<String, String> valueMap = new HashMap<String, String>();
            
            // add values to valueMap based on selected row and/or column.
    
            return valueMap;
          }
        });

    Comment

    Working...
    X