com.smartgwt.client.types
Enum RowSpanEditMode

java.lang.Object
  extended by java.lang.Enum<RowSpanEditMode>
      extended by com.smartgwt.client.types.RowSpanEditMode
All Implemented Interfaces:
ValueEnum, Serializable, Comparable<RowSpanEditMode>

public enum RowSpanEditMode
extends Enum<RowSpanEditMode>
implements ValueEnum

When allowRowSpanning is enabled, certain cells may span multiple rows. In this case, the cell displays the value from the record in the first row. If the grid is editable (and the field is also editable), these settings allow the user to specify what happens to the data when the user edits this cell.

Note that in this scenario, a user may begin an edit on the row-spanning cell directly (via double-click for example), or on a cell in another column in any of the rows spanned by the cell. The appropriate behavior with respect to user-experience and how the data is manipulated will depend on the application in question. Developers may of course entirely disable editing for the field via canEdit or canEditCell.

See also: useRowSpanStyling


Enum Constant Summary
EACH
          This setting assumes that each row's values are logically separate, so if a cell spans multiple rows, and a user initializes an edit on some cell in the second spanned row, the spanning cell will show an editor containing the value for the second spanned row.
FIRST
          This setting assumes that only the field-value for the first record spanned by this cell is significant.
 
Method Summary
 String getValue()
           
static RowSpanEditMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RowSpanEditMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FIRST

public static final RowSpanEditMode FIRST
This setting assumes that only the field-value for the first record spanned by this cell is significant. In this case the editor will only show for this cell if the user is editing the first spanned record. If the user initialized the edit on another spanned row, the editor will not show for this field.


EACH

public static final RowSpanEditMode EACH
This setting assumes that each row's values are logically separate, so if a cell spans multiple rows, and a user initializes an edit on some cell in the second spanned row, the spanning cell will show an editor containing the value for the second spanned row. This may differ from the value displayed when not in edit mode (which is derived from the first spanned row by default). This setting may be useful for developers who which to implement their own logic on how to handle spanning cell display values and/or edit values (for example by customizing ListGridField.formatCellValue and applying custom logic to handle editing on ListGridField.editorEnter and ListGridField.editorExit).

Method Detail

values

public static RowSpanEditMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RowSpanEditMode c : RowSpanEditMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RowSpanEditMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getValue

public String getValue()
Specified by:
getValue in interface ValueEnum