dojox/grid/enhanced/plugins/exporter/CSVWriter (version 1.10)

dojox/grid/enhanced/plugins/exporter/_ExportWriter

Summary

Export grid to CSV format.

Usage

var foo = new CSVWriter(writerArgs);
dojox/grid/enhanced/plugins/exporter/CSVWriter
Parameter Type Description
writerArgs object
Optional

{separator:'...'}

Property Summary

Method Summary

Properties

Methods

_formatCSVCell(cellValue)

Format cell value to follow CSV standard. See: http://en.wikipedia.org/wiki/Comma-separated_values

Parameter Type Description
cellValue string

The value in a cell.

Returns:any | string

The formatted content of a cell

_getExportDataForCell(rowIndex,rowItem,cell,grid)
Parameter Type Description
rowIndex undefined
rowItem undefined
cell undefined
grid undefined
Returns:undefined
afterContent()

We have finished the entire grid travel. Do some clean up work if you need to.

Returns:any

undefined

afterContentRow(argObj)

After handling a line of data (not header).

Parameter Type Description
argObj object

An object with at least the following context properties available:

{
    grid,isHeader,
    row,rowIdx,
    spCols
}
Returns:any

undefined

afterHeader()

The header line has been handled.

Returns:any

undefined

afterSubrow(argObj)

Before handling a subrow in a line (defined in the grid structure).

Parameter Type Description
argObj object

An object with at least the following context properties available:

{
    grid,isHeader,
    row,rowIdx,
    view,viewIdx,
    subrow,subrowIdx,
    spCols(if isHeader==false)
}
Returns:any

undefined

afterView(argObj)

After handling a view.

Parameter Type Description
argObj object

An object with at least the following context properties available:

{
    grid,isHeader,
    view,viewIdx,
    spCols(if isHeader==false)
}
Returns:any

undefined

beforeContent(items)

We are ready to go through all the contents(items).

Parameter Type Description
items Array

All the items fetched from the store

Returns:any | boolean
  • true: go on handling the contents and then call afterContent.
  • false: skip all the contents, won't call afterContent.
beforeContentRow(arg_obj)

Overrided from _ExportWriter

Parameter Type Description
arg_obj object
Returns:boolean
beforeHeader(grid)

We are going to start the travel in the grid. Is there anything we should do now?

Parameter Type Description
grid EnhancedGrid
Returns:any | boolean
  • true: go on handling the header row and then call afterHeader.
  • false: skip the header row, won't call afterHeader.
beforeSubrow(argObj)

Before handling a subrow in a line (defined in the grid structure).

Parameter Type Description
argObj object

An object with at least the following context properties available:

{
    grid,isHeader,
    row,rowIdx,
    view,viewIdx,
    subrow,subrowIdx,
    spCols(if isHeader==false)
}
Returns:any | boolean
  • true: go on handling the current subrow and then call afterSubrow.
  • false: skip the current subrow, won't call afterSubrow.
beforeView(argObj)

Before handling a view.

Parameter Type Description
argObj object

An object with at least the following context properties available:

{
    grid,isHeader,
    view,viewIdx,
    spCols(if isHeader==false)
}
Returns:any | boolean
  • true: go on handling the current view and then call afterView.
  • false: skip the current view, won't call afterView.
handleCell(arg_obj)

Overrided from _ExportWriter

Parameter Type Description
arg_obj object
toString()

Overrided from _ExportWriter

Returns:number
Error in the documentation? Can’t find what you are looking for? Let us know!