Package com.smartgwt.client.tools

# Class GridEditProxy

java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.tools.EditProxy
com.smartgwt.client.tools.CanvasEditProxy
com.smartgwt.client.tools.LayoutEditProxy
com.smartgwt.client.tools.GridEditProxy

All Implemented Interfaces:
  `HasHandlers`

public class GridEditProxy extends LayoutEditProxy
`EditProxy` that handles `ListGrid` and `TreeGrid` components when editMode is enabled.

See Also:
  - `Dashboards & Tools Framework Overview`

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.BaseClass

  `config, configOnly, factoryCreated, factoryProperties, id, scClassName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GridEditProxy()`
  `GridEditProxy(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `JavaScriptObject`
  `create()`
  `Boolean`
  `getCanAddFormulaFields()`
  Can new formula fields be created from header context menu? Overrides `ListGrid.canAddFormulaFields` when in edit mode.
  `Boolean`
  `getCanAddSummaryFields()`
  Can new summary fields be created from header context menu? Overrides `ListGrid.canAddSummaryFields` when in edit mode.
  `Boolean`
  `getCanEditHilites()`
  Can highlights be edited from header context menu? Overrides `ListGrid.canEditHilites` when in edit mode.
  `Boolean`
  `getCanGroupBy()`
  Can records be grouped from header context menu? Overrides `ListGrid.canGroupBy` when in edit mode.
  `Boolean`
  `getCanReorderFields()`
  Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields.
  `Boolean`
  `getCanResizeFields()`
  Indicates whether fields in this listGrid can be resized by dragging header fields.
  `Boolean`
  `getGenerateEditableFormulas()`
  Controls whether formula fields created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode).
  `Boolean`
  `getGenerateEditableHilites()`
  Controls whether highlights created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode).
  `Boolean`
  `getGenerateEditableSummaries()`
  Controls whether summary fields created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode).
  `void`
  `getInlineEditText()`
  Returns the text based on the current component state to be edited inline.
  `static GridEditProxy`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `Boolean`
  `getSaveFieldFrozenState()`
  Should changes to which fields are `frozen` be persisted?
  `Boolean`
  `getSaveFieldOrder()`
  Should changes to grid field order be persisted?
  `Boolean`
  `getSaveFieldVisibility()`
  Should changes to grid field visibility be persisted?
  `Boolean`
  `getSaveFilterCriteria()`
  Should changes to filter criteria by end user editing of criteria in the `filter editor` by persisted?
  `Boolean`
  `getSaveGroupBy()`
  Should changes to grid grouping (including both grouping and ungrouping the grid) be persisted?
  `Boolean`
  `getSaveSort()`
  Should changes to which fields are sorted be persisted?
  `GridEditProxy`
  `setCanAddFormulaFields(Boolean canAddFormulaFields)`
  Can new formula fields be created from header context menu? Overrides `ListGrid.canAddFormulaFields` when in edit mode.
  `GridEditProxy`
  `setCanAddSummaryFields(Boolean canAddSummaryFields)`
  Can new summary fields be created from header context menu? Overrides `ListGrid.canAddSummaryFields` when in edit mode.
  `GridEditProxy`
  `setCanEditHilites(Boolean canEditHilites)`
  Can highlights be edited from header context menu? Overrides `ListGrid.canEditHilites` when in edit mode.
  `GridEditProxy`
  `setCanGroupBy(Boolean canGroupBy)`
  Can records be grouped from header context menu? Overrides `ListGrid.canGroupBy` when in edit mode.
  `GridEditProxy`
  `setCanReorderFields(Boolean canReorderFields)`
  Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields.
  `GridEditProxy`
  `setCanResizeFields(Boolean canResizeFields)`
  Indicates whether fields in this listGrid can be resized by dragging header fields.
  `GridEditProxy`
  `setGenerateEditableFormulas(Boolean generateEditableFormulas)`
  Controls whether formula fields created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode).
  `GridEditProxy`
  `setGenerateEditableHilites(Boolean generateEditableHilites)`
  Controls whether highlights created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode).
  `GridEditProxy`
  `setGenerateEditableSummaries(Boolean generateEditableSummaries)`
  Controls whether summary fields created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode).
  `void`
  `setInlineEditText(String newValue)`
  Save the new value into the component's state.
  `GridEditProxy`
  `setSaveFieldFrozenState(Boolean saveFieldFrozenState)`
  Should changes to which fields are `frozen` be persisted?
  `GridEditProxy`
  `setSaveFieldOrder(Boolean saveFieldOrder)`
  Should changes to grid field order be persisted?
  `GridEditProxy`
  `setSaveFieldVisibility(Boolean saveFieldVisibility)`
  Should changes to grid field visibility be persisted?
  `GridEditProxy`
  `setSaveFilterCriteria(Boolean saveFilterCriteria)`
  Should changes to filter criteria by end user editing of criteria in the `filter editor` by persisted?
  `GridEditProxy`
  `setSaveGroupBy(Boolean saveGroupBy)`
  Should changes to grid grouping (including both grouping and ungrouping the grid) be persisted?
  `GridEditProxy`
  `setSaveSort(Boolean saveSort)`
  Should changes to which fields are sorted be persisted?

  ### Methods inherited from class com.smartgwt.client.tools.EditProxy

  `getAllowNestedDrops, getAutoMaskChildren, getBringToFrontOnSelect, getCanSelect, getCanSelectChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getEditMask, getHoopSelector, getInlineEditEvent, getInlineEditForm, getInlineEditInstructionLabel, getInlineEditInstructions, getInlineEditMultiline, getInlineEditOnDrop, getJsObj, getOrCreateJsObj, getPersistCoordinates, getSelectedAppearance, getSelectedBorder, getSelectedLabelBackgroundColor, getSelectedTintColor, getSelectedTintOpacity, getShowDragHandle, getSupportsInlineEdit, getUseCopyPasteShortcuts, getUseEditMask, isCreated, setAllowNestedDrops, setAutoMaskChildren, setBringToFrontOnSelect, setCanSelect, setCanSelectChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setInlineEditEvent, setInlineEditInstructions, setInlineEditMultiline, setInlineEditOnDrop, setJavaScriptObject, setPersistCoordinates, setSelectedAppearance, setSelectedBorder, setSelectedLabelBackgroundColor, setSelectedTintColor, setSelectedTintOpacity, setShowDragHandle, setSupportsInlineEdit, setUseCopyPasteShortcuts, setUseEditMask, showSelectedAppearance, startInlineEditing, startInlineEditing`

  ### Methods inherited from class com.smartgwt.client.core.BaseClass

  `addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### GridEditProxy

    public GridEditProxy()

  - ### GridEditProxy

    public GridEditProxy(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static GridEditProxy getOrCreateRef(JavaScriptObject jsObj)

  - ### create

    public JavaScriptObject create()
    Overrides:
      `create` in class `LayoutEditProxy`

  - ### setCanAddFormulaFields

    public GridEditProxy setCanAddFormulaFields(Boolean canAddFormulaFields) throws IllegalStateException
    Can new formula fields be created from header context menu? Overrides `ListGrid.canAddFormulaFields` when in edit mode.
    Parameters:
      `canAddFormulaFields` - New canAddFormulaFields value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getCanAddFormulaFields

    public Boolean getCanAddFormulaFields()
    Can new formula fields be created from header context menu? Overrides `ListGrid.canAddFormulaFields` when in edit mode.
    Returns:
      Current canAddFormulaFields value. Default value is true

  - ### setCanAddSummaryFields

    public GridEditProxy setCanAddSummaryFields(Boolean canAddSummaryFields) throws IllegalStateException
    Can new summary fields be created from header context menu? Overrides `ListGrid.canAddSummaryFields` when in edit mode.
    Parameters:
      `canAddSummaryFields` - New canAddSummaryFields value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getCanAddSummaryFields

    public Boolean getCanAddSummaryFields()
    Can new summary fields be created from header context menu? Overrides `ListGrid.canAddSummaryFields` when in edit mode.
    Returns:
      Current canAddSummaryFields value. Default value is true

  - ### setCanEditHilites

    public GridEditProxy setCanEditHilites(Boolean canEditHilites) throws IllegalStateException
    Can highlights be edited from header context menu? Overrides `ListGrid.canEditHilites` when in edit mode.
    Parameters:
      `canEditHilites` - New canEditHilites value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getCanEditHilites

    public Boolean getCanEditHilites()
    Can highlights be edited from header context menu? Overrides `ListGrid.canEditHilites` when in edit mode.
    Returns:
      Current canEditHilites value. Default value is true

  - ### setCanGroupBy

    public GridEditProxy setCanGroupBy(Boolean canGroupBy) throws IllegalStateException
    Can records be grouped from header context menu? Overrides `ListGrid.canGroupBy` when in edit mode.
    Parameters:
      `canGroupBy` - New canGroupBy value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getCanGroupBy

    public Boolean getCanGroupBy()
    Can records be grouped from header context menu? Overrides `ListGrid.canGroupBy` when in edit mode.
    Returns:
      Current canGroupBy value. Default value is true

  - ### setCanReorderFields

    public GridEditProxy setCanReorderFields(Boolean canReorderFields) throws IllegalStateException
    Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields. Overrides `ListGrid.canReorderFields` when in edit mode.
    Parameters:
      `canReorderFields` - New canReorderFields value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getCanReorderFields

    public Boolean getCanReorderFields()
    Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields. Overrides `ListGrid.canReorderFields` when in edit mode.
    Returns:
      Current canReorderFields value. Default value is true

  - ### setCanResizeFields

    public GridEditProxy setCanResizeFields(Boolean canResizeFields) throws IllegalStateException
    Indicates whether fields in this listGrid can be resized by dragging header fields. Overrides `ListGrid.canResizeFields` when in edit mode.
    Parameters:
      `canResizeFields` - New canResizeFields value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getCanResizeFields

    public Boolean getCanResizeFields()
    Indicates whether fields in this listGrid can be resized by dragging header fields. Overrides `ListGrid.canResizeFields` when in edit mode.
    Returns:
      Current canResizeFields value. Default value is true

  - ### setGenerateEditableFormulas

    public GridEditProxy setGenerateEditableFormulas(Boolean generateEditableFormulas) throws IllegalStateException
    Controls whether formula fields created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode). See `ListGridField.canEditFormula`.
    Parameters:
      `generateEditableFormulas` - New generateEditableFormulas value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getGenerateEditableFormulas

    public Boolean getGenerateEditableFormulas()
    Controls whether formula fields created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode). See `ListGridField.canEditFormula`.
    Returns:
      Current generateEditableFormulas value. Default value is true

  - ### setGenerateEditableHilites

    public GridEditProxy setGenerateEditableHilites(Boolean generateEditableHilites) throws IllegalStateException
    Controls whether highlights created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode). See `Hilite.canEdit`.
    Parameters:
      `generateEditableHilites` - New generateEditableHilites value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getGenerateEditableHilites

    public Boolean getGenerateEditableHilites()
    Controls whether highlights created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode). See `Hilite.canEdit`.
    Returns:
      Current generateEditableHilites value. Default value is true

  - ### setGenerateEditableSummaries

    public GridEditProxy setGenerateEditableSummaries(Boolean generateEditableSummaries) throws IllegalStateException
    Controls whether summary fields created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode). See `ListGridField.canEditSummary`.
    Parameters:
      `generateEditableSummaries` - New generateEditableSummaries value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getGenerateEditableSummaries

    public Boolean getGenerateEditableSummaries()
    Controls whether summary fields created while in edit mode are editable by end users at runtime (when the grid is no longer in edit mode). See `ListGridField.canEditSummary`.
    Returns:
      Current generateEditableSummaries value. Default value is true

  - ### setSaveFieldFrozenState

    public GridEditProxy setSaveFieldFrozenState(Boolean saveFieldFrozenState) throws IllegalStateException
    Should changes to which fields are `frozen` be persisted?

    Note that changes are saved directly into the ListGridFields not via fieldState or viewState settings. EditNodes will also be introduced for fields as needed if they do not already exist.

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Parameters:
      `saveFieldFrozenState` - New saveFieldFrozenState value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getSaveFieldFrozenState

    public Boolean getSaveFieldFrozenState()
    Should changes to which fields are `frozen` be persisted?

    Note that changes are saved directly into the ListGridFields not via fieldState or viewState settings. EditNodes will also be introduced for fields as needed if they do not already exist.

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Returns:
      Current saveFieldFrozenState value. Default value is true

  - ### setSaveFieldOrder

    public GridEditProxy setSaveFieldOrder(Boolean saveFieldOrder) throws IllegalStateException
    Should changes to grid field order be persisted?

    Note that changes are saved directly into the ListGridFields not via fieldState or viewState settings. EditNodes will also be introduced for fields as needed if they do not already exist.

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Parameters:
      `saveFieldOrder` - New saveFieldOrder value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getSaveFieldOrder

    public Boolean getSaveFieldOrder()
    Should changes to grid field order be persisted?

    Note that changes are saved directly into the ListGridFields not via fieldState or viewState settings. EditNodes will also be introduced for fields as needed if they do not already exist.

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Returns:
      Current saveFieldOrder value. Default value is true

  - ### setSaveFieldVisibility

    public GridEditProxy setSaveFieldVisibility(Boolean saveFieldVisibility) throws IllegalStateException
    Should changes to grid field visibility be persisted?

    Note that changes are saved directly into the ListGridFields not via fieldState or viewState settings. EditNodes will also be introduced for fields as needed if they do not already exist.

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Parameters:
      `saveFieldVisibility` - New saveFieldVisibility value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getSaveFieldVisibility

    public Boolean getSaveFieldVisibility()
    Should changes to grid field visibility be persisted?

    Note that changes are saved directly into the ListGridFields not via fieldState or viewState settings. EditNodes will also be introduced for fields as needed if they do not already exist.

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Returns:
      Current saveFieldVisibility value. Default value is true

  - ### setSaveFilterCriteria

    public GridEditProxy setSaveFilterCriteria(Boolean saveFilterCriteria) throws IllegalStateException
    Should changes to filter criteria by end user editing of criteria in the `filter editor` by persisted?

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Parameters:
      `saveFilterCriteria` - New saveFilterCriteria value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getSaveFilterCriteria

    public Boolean getSaveFilterCriteria()
    Should changes to filter criteria by end user editing of criteria in the `filter editor` by persisted?

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Returns:
      Current saveFilterCriteria value. Default value is true

  - ### setSaveGroupBy

    public GridEditProxy setSaveGroupBy(Boolean saveGroupBy) throws IllegalStateException
    Should changes to grid grouping (including both grouping and ungrouping the grid) be persisted?

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Parameters:
      `saveGroupBy` - New saveGroupBy value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getSaveGroupBy

    public Boolean getSaveGroupBy()
    Should changes to grid grouping (including both grouping and ungrouping the grid) be persisted?

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Returns:
      Current saveGroupBy value. Default value is true

  - ### setSaveSort

    public GridEditProxy setSaveSort(Boolean saveSort) throws IllegalStateException
    Should changes to which fields are sorted be persisted?

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Parameters:
      `saveSort` - New saveSort value. Default value is true
    Returns:
      `GridEditProxy` instance, for chaining setter calls
    Throws:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getSaveSort

    public Boolean getSaveSort()
    Should changes to which fields are sorted be persisted?

    Only valid with `SelectedAppearance` settings that allow direct interactivity (such as "outlineEdges").

    Returns:
      Current saveSort value. Default value is true

  - ### getInlineEditText

    public void getInlineEditText()
    Returns the text based on the current component state to be edited inline. Called by the `EditProxy.inlineEditForm` to obtain the starting edit value.

    Returns the grid's wiki-style data - see `MockDataSource.mockData` for a description of this format.

    Overrides:
      `getInlineEditText` in class `EditProxy`

  - ### setInlineEditText

    public void setInlineEditText(String newValue)
    Save the new value into the component's state. Called by the `EditProxy.inlineEditForm` to commit the change.

    Updates the grid's data and field configuration.

    Overrides:
      `setInlineEditText` in class `EditProxy`
    Parameters:
      `newValue` - the new grid configuration