Home Index General Info API / Developers Manual Demos Download Contact
Column

Constructor
Column function Column([Integer ColumnIndex], [String Key], [String ColumnName], [String ColumnHeaderIcon], [Integer Width], [String Alignment], [ColumnTypeConstant ColumnType], [String DefaultValue], [String RowIcon], [String ScriptEvents], [String InlineStyles])- used to add a new Column in the grid. All the arguments are optional, you can also pass null for arguments that you do not wish to pass. Calling this method with no arguments results in creation of a Column at the end of the table with no ColumnLabel and with Label elements. The various arguments are
  • ColumnIndex - Specifies the position into which the Column is to be inserted. If value to this argument is not passed the column will get appended to the end of the grid.
  • Key - Unique identifier for the column. If the Key is provided, the column can be accessed by using the key name as a argument for getColumn(String ColumnIndex).
  • ColumnName - The text that is displayed on the column header
  • ColumnHeaderIcon - represents the name of the icon that is to be displayed on the Column Header.
  • Width - specifies the width of the column. Width can be specified as a whole number or as a percentage.
  • Alignment - Specifies the Alignment of the ColumnHeader.
  • ColumnType - represents the ColumnType of the Column. ColumnTypes can be DG_TEXT, DG_SELECT, DG_READONLY, DG_CHECKBOX, DG_RADIO, DG_PASSWORD, DG_TEXTAREA, DG_HIDDEN, DG_FILE, DG_TEXTX, DG_IMAGE, DG_NUMERIC, DG_BOOLEAN, DG_LABEL. For more information on the ColumnTypes refer to the section on Constants.
  • DefaultValue - represents the default value that must be set on creation of the cells in the column.
  • RowIcon - The image specified by RowIcon is set as the Icon in each row of this Column.
  • ScriptEvents - User-defined scripts can be provided here.
  • InlineStyles - User-defined styles can be provided here.
  • [ Top ]
     
    Variables
    String align - represents the Alignment property of the Column.Accessor Methods: getAlignment()/setAlignment()
    String backgroundColor - represents the backgroundColor property of the Column.Accessor Methods: getbackgroundColor()/setBackgroundColor()
    Reserved cell- reference to the cell object of this column. Used Internally
    Reserved cellElement- Used Internally.
    Integer colNum - Used Internally.
    String columnIcon- refers to the Icon that is to be displayed in the Column Header. Accessor Methods : getColumnIcon()/setColumnIcon()
    String columnName- refers to the Name of the Column. Accessor Methods : getColumnName()/setColumnName()
    ColumnTypeConstant columnType - refers to the type of object in the column. Accessor Method : getColumnType()
    String defaultValue- refers to the default value that is to be set for the cell in the column on creation. Accessor Methods : getDefaultValue()
    String events- refers to the user defined script for the column. Accessor Methods : getEvents()
    String fontName - represents the fontName property of the Column.Accessor Methods: getFontName()/setFontName()
    String fontSize - represents the fontSize property of the Column.Accessor Methods: getFontSize()/setFontSize()
    String fontStyle - represents the fontStyle property of the Column.Accessor Methods: getForegroundColor()/setForegroundColor()
    String foregroundColor - represents the foregroundColor property of the Column.Accessor Methods: getForegroundColor()/setForegroundColor()
    String icon- refers to the icon that is to be used for each cell in this column. The icon is displayed in 16x16 dimension. Accessor Methods : getIcon()
    String key - represents the Key associated with the Column. Accessor Methods : getKey()/setKey()
    Reserved object- refers to the current object
    Readonly parent- reference to the parent ColumnHeaders object
    String style- refers to the inline style for the column. Accessor Methods : getStyle()
    Boolean visible - Toggle switch for visible property of the Column. Accessor Methods : isVisible()/setVisible()
    Integer width- refers to the width of the column. Accessor Methods : getWidth()/setWidth()
    [ Top ]
     
    Method Summary
    void deleteColumn()- Deletes this Column
    String getAlignment()- gets the Alignment for the Column. The default alignment is DG_LEFT
    String getBackgroundColor()- gets the background color of the Column. The Default value is DG_NOCOLOR
    String getBackgroundImage()- gets the backgroundImage of the Column. If there is no backgroundImage "" (empty string) is returned
    Reserved getCell() - Used Internally
    Reserved getCellElement()
    Reserved getColNum()- Used Internally
    Array getColumnDetails()- returns a array containing the array properties
    ColumnHeaders getColumnHeaders()- see getParent()
    String getColumnIcon()- gets the ColumnIcon property
    Integer getColumnIndex()- gets the Column Index
    String getColumnName()- gets the ColumnName
    ColumnTypeConstant getColumnType()- gets the Column type for this column
    String getDefaultValue()- gets the default value for this Column
    String getEvents()- gets the user-defined script for this Column
    String getFontName()- gets the FontName for the Column. The default is verdana
    String getFontSize()- gets the FontSize of the Column. The default size is 10
    String getFontStyle()- gets the FontStyle of the Column. The default style is DG_NONE
    String getForegroundColor()- gets the foreground color of the Column.
    String getIcon()- gets the Icon that is to be set for each cell in this column. If there is not icon "" (empty string) returned.
    String getKey()- gets the Key for this column. If there is no key specified null is returned.
    Reserved Column getObject()- returns a reference to this object
    DG_COLUMN getObjectID()- gets the Object type. i.e. DG_COLUMN
    ColumnHeaders getParent()- gets the parent ColumnHeaders object
    String getStyle()- gets the Inline Style for this Column
    Integer getWidth()- gets the width of the Column
    Boolean isRaised()- gets the raised property for the Column Header
    Boolean isVisible()- gets the visible property of the Column. The default is true
    Reserved parseEvents(f_events)
    Reserved parseStyle(f_style)
    void setAlignment(String Alignment)- sets the Alignment for the Column.
    void setBackgroundColor(String Color, Boolean ApplyToColumn)- sets the background color of the Column. if the ApplyToColumn is true, the whole column is colored, else only the column's header is colored. by default applyToColumn is true. Constants DG_APPLY_ALL and DG_APPLY_CELL can be used to denote the ApplyToColumn argument. Note:Use DG_NOCOLOR for transparency.
    void setBackgroundImage(String Image)- sets the background image of the Column to the image specified by 'Image'.
    void setColumnIcon(String Image)- sets the value of Image as a icon for the Column
    void setColumnName(String ColumnName)- sets the ColumnName for this Column
    void setFont(String FontName, String FontStyle, Integer FontSize)- sets the font properties of the Column. FontName is the name of the font, FontStyle is the style of the font (DG_NONE, DG_PLAIN, DG_BOLD, DG_ITALIC, DG_BOLDITALIC), FontSize is the size of the text.
    void setFontName(String FontName)- sets the FontName for the Column.
    void setFontSize(Integer FontSize)- sets the FontSize for the Column
    void setFontStyle(String FontStyle)- sets the FontStyle for the Column. The following are the predefined style constants DG_NONE, DG_PLAIN, DG_BOLD, DG_ITALIC, DG_BOLDITALIC
    void setForegroundColor(String Color)- sets the foreground color of the Column.
    void setKey(String Key)- sets the Key for this Column.
    void setRaised(Boolean State)- sets the raised property for the Column Header
    void setVisible(Boolean State)- sets the visible property of the Column.
    void setWidth(Integer Width)- sets the Width for this Column. Width can either be a whole number or a percentage
    [ Top ]
     
    Reserved : Property/Method that is intended to be used by the grid internally. Though accessor methods may be provided to these property/methods, their usage by the developer is not recommended and must be avaoided.
    ReadOnly : Property that is ReadOnly. Overwriting a Readonly Property may result in failure of the Grid
    Hosted by www.Geocities.ws

    1