ASP.NET MVC Controls
CellRange Class
File
wijmo.grid.js
Module
wijmo.grid

Represents a rectangular group of cells defined by two row indices and two column indices.

Constructor

Properties

Methods

Constructor

constructor

constructor(r?: number, c?: number, r2?: number, c2?: number): CellRange

Initializes a new instance of the CellRange class.

Parameters
Returns
CellRange

Properties

bottomRow

Gets the index of the bottom row in the range.

Type
number

col

Gets or sets the index of the first column in the range.

Type
number

col2

Gets or sets the index of the second column in the range.

Type
number

columnSpan

Gets the number of columns in the range.

Type
number

isSingleCell

Checks whether this range corresponds to a single cell (beginning and ending rows have the same index, and beginning and ending columns have the same index).

Type
boolean

isValid

Checks whether the range contains valid row and column indices (row and column values are zero or greater).

Type
boolean

leftCol

Gets the index of the leftmost column in the range.

Type
number

rightCol

Gets the index of the rightmost column in the range.

Type
number

row

Gets or sets the index of the first row in the range.

Type
number

row2

Gets or sets the index of the second row in the range.

Type
number

rowSpan

Gets the number of rows in the range.

Type
number

topRow

Gets the index of the top row in the range.

Type
number

Methods

clone

clone(): CellRange

Creates a copy of the range.

Returns
CellRange

contains

contains(r: any, c?: number): boolean

Checks whether the range contains another range or a specific cell.

Parameters
  • r: any

    The CellRange object or row index to find.

  • c: number Optional

    The column index (required if the r parameter is not a CellRange object).

Returns
boolean

containsColumn

containsColumn(c: number): boolean

Checks whether the range contains a given column.

Parameters
  • c: number

    The index of the column to find.

Returns
boolean

containsRow

containsRow(r: number): boolean

Checks whether the range contains a given row.

Parameters
  • r: number

    The index of the row to find.

Returns
boolean

equals

equals(rng: CellRange): boolean

Checks whether the range equals another range.

Parameters
  • rng: CellRange

    The CellRange object to compare to this range.

Returns
boolean

getRenderSize

getRenderSize(p: GridPanel): Size

Gets the rendered size of this range.

Parameters
Returns
Size

intersects

intersects(rng: CellRange): boolean

Checks whether the range intersects another range.

Parameters
  • rng: CellRange

    The CellRange object to check.

Returns
boolean

intersectsColumn

intersectsColumn(rng: CellRange): boolean

Checks whether the range intersects the columns in another range.

Parameters
  • rng: CellRange

    The CellRange object to check.

Returns
boolean

intersectsRow

intersectsRow(rng: CellRange): boolean

Checks whether the range intersects the rows in another range.

Parameters
  • rng: CellRange

    The CellRange object to check.

Returns
boolean

setRange

setRange(r?: number, c?: number, r2?: number, c2?: number): void

Initializes an existing CellRange.

Parameters
  • r: number Optional

    The index of the first row in the range (defaults to -1).

  • c: number Optional

    The index of the first column in the range (defaults to -1).

  • r2: number Optional

    The index of the last row in the range (defaults to r).

  • c2: number Optional

    The index of the last column in the range (defaults to c).

Returns
void

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback