Announcement

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

    How supply default field values for new ListGridRecord

    I see from the docs that the startEditingNew(Map defaultValues) method can take a Map of default values for the new record. But how do I supply default values when editing of a new record is initiated by the user tabbing out of the last column in the last row due to setListEndEditAction(RowEndEditAction.NEXT)?

    #2
    Use a combination of the EditorEnter event and setEditValues().

    Comment


      #3
      I am trying to implement the solution you suggested using onEditorEnter and setEditValues, but it will not work in my case because the attribute I am trying to set is not one of the fields in the grid. It is a foreign key attribute, and it is a required field. How do I set a default value for this programmatically?

      Comment


        #4
        Doesn't matter - setEditValues will accept values for fields that are not shown.

        Comment

        Working...
        X