Class GridView

WorkBook

Class Summary
Constructor Attributes Constructor Name and Description
 
A Class to handle the User Inteface of Cells in Worksheet/Grid

Method Summary

Class Detail

GridView()
A Class to handle the User Inteface of Cells in Worksheet/Grid
require('GridView')

Method Detail

  • <static> GridView.calculateCell(sheetId, row, column, OldValue, newValue, checkCircularDependency)
    This function can be called through programmatically to calculate the cell and call saveCell to save teh values to Database. A1=> row:0, col:0
    Parameters:
    {Integer} sheetId
    {Integer} row
    {Integer} column
    {String} OldValue
    {String} newValue
    if user applies a formula, then the newValue will be the formula.
    {Boolean} checkCircularDependency
    if it is true, then it required to check teh dircular dependancy with the cell formula.
  • <static> GridView.calculateGroup(groupId)
    This function will recalculate the group result with the existing group formula.
    Parameters:
    {Integer} groupId
    the group which need to be calculated
  • <static> GridView.cancelCellEdit(cell)
    This method will cancell the cell edit, by removing editCellDiv from DOM, and updates the cell value. It will be called once the user select another while editing the cell, hence the cell value need to be saved.
    Parameters:
    {Object} cell
  • <static> GridView.clearArea(selection)
    It clears the the Area provided if there is no Group formula found.
    Parameters:
    {Object} selection
    Selection Object should be {}
  • <static> GridView.clearColumn()
    Clears the complete column if the cell is not associted a group with a formula. the row number is calculated from the selection happened earlier by the user.
  • <static> GridView.clearRow()
    Clears the complete row if the cell is not associted a group with a formula. the row number is calculated from the selection happened earlier by the user.
  • <static> GridView.editCell(cell, event)
    If user try to edit a cell by double clicking on the cell, this method will be called Refer MouseListener.If the cell is a part of any group with formula is associated it will popup with Editor to updated the formula.other wise editTextFieldDiv will be created with an input Object and the values will be populated.
    Parameters:
    {Object} cell
    {Event} event
  • <static> {String} GridView.getRowHtml(sheetId, row)
    This function will create String object of the html row with the cell data.
    Parameters:
    {Integer} sheetId
    {Integer} row
    the row number which required.
    Returns:
    {String} String format of teh HTML Row data.
  • <static> GridView.getScrollBarWidth()
    Scroll Bar Width will be Different in Different browsers, It will return the Scroll Bar Size.
  • <static> {Integer} GridView.getViewRows()
    Depends on the Browser Size, the Visible Rows Size are different, It returns the Maximum Number of Rows That can present in Current View.
    Returns:
    {Integer} rows The number of rows can be shown in the current view.
  • <static> GridView.isCellIsHeader(wsId, row, col)
    Check whether the given cell is the part of any header like column header of range name header.
    Parameters:
    {Integer} wsId
    {Integer} row
    {Integer} col
  • <static> GridView.loadRowData(diff)
    This function will create the cell to the sheet where the user is scrolling for. The data is already loaded through Ajax initially.It also apply all the vent listener like KeyListener and MouseListener to the cells.
    Parameters:
    {Integer} diff
    the number of rows need to be loaded.
  • <static> GridView.saveCell(sheetId, row, column, formula, value)
    Once the Cell Edit happened & User Accept the Value, excluding ESC Button event. Need to Update in the Sheet. row=1 means first Row, Similar in Column First CellA1=> row=1: col=1 It will check whether the cell is already existing in the system @nexcelCellList, if not will create a new one. Then it will update in the View, and do an Ajax request to update in the server.
    Parameters:
    {Integer} sheetId
    The sheet in which the row or column added
    {Integer} row
    {Integer} column
    {String} formula
    If there is no formula associated then the value will be null.
    {String} value
    The result value.
  • <static> GridView.setSize()
    sets the size of teh GridView with respect to the Windowsize.
  • <static> GridView.updateCell(sheetId, row, column, OldValue, newValue)
    This function can be called through programmatically to save a cell with a value, it need to pass old value and new value, it will do calculation if formula available and update it, if it is calculated it required to update the dependencies. A1=> row:0, col:0
    Parameters:
    {Integer} sheetId
    {Integer} row
    {Integer} column
    {Integer} OldValue
    {Integer} newValue
  • <static> GridView.updateCellByEvent(event)
    save a Cell Associated with teh Editing textField. The function can be called only through an event.
    Parameters:
    {Event} event