Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/grid/enhanced/plugins/Exporter.js

  • Provides:

    • dojox.grid.enhanced.plugins.Exporter
  • Requires:

    • dojox.grid.enhanced._Plugin in common
    • dojox.grid._RowSelector in common
  • dojox.grid.enhanced.plugins.Exporter

    • type
      Function
    • chains:
      • dojox.grid.enhanced._Plugin: (prototype)
      • dojox.grid.enhanced._Plugin: (call)
    • parameters:
      • grid: (typeof EnhancedGrid)
        The grid to plug in to.
      • args
    • summary
      Provide functions to export the grid data into a given format.
      
      Acceptable plugin parameters:
      1. exportFormatter: function(data, cell, rowIndex, item)
      Provide a way to customize how data should look in exported string.
      Note that usually the formatter of grid cell should not be used here (it can return HTML or even widget).
    • example
      	function onExported(exported_text){
      		//custom code here...
      	}
      	dijit.byId("my_grid_id").exportTo("csv",	//registered export format, mandatory
      		{										//the whole object is optional.
      			fetchArgs: {start:0,count:1000},	//keywordArgs for fetch, optional
      			writerArgs: {separator:';'},		//export writer specific arguments, optional
      		},
      		function(str){
      			//call back function, mandatory
      	});
      	var result = dijit.byId("my_grid_id").exportSelectedTo("table",     //registered export format, mandatory
      														{separator:'|'} //export writer specific arguments, optional
      	);
  • dojox.grid.enhanced.plugins.Exporter.name

    • type
      String
    • summary
      Plugin name.
  • dojox.grid.enhanced.plugins.Exporter.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • grid: (typeof EnhancedGrid)
        The grid to plug in to.
      • args
    • summary
      only newed by _Plugin
  • dojox.grid.enhanced.plugins.Exporter._mixinGrid

    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter.grid

    • type
      EnhancedGrid
    • summary
      The grid to plug in to.
  • dojox.grid.enhanced.plugins.Exporter.grid.exportTo

    • type
      Object
  • dojox.grid.enhanced.plugins.Exporter.grid.exportGrid

    • type
      Object
  • dojox.grid.enhanced.plugins.Exporter.grid.exportSelected

    • type
      Object
  • dojox.grid.enhanced.plugins.Exporter.grid.setExportFormatter

    • type
      Object
  • dojox.grid.enhanced.plugins.Exporter.setExportFormatter

    • parameters:
      • formatter
    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter.formatter

  • dojox.grid.enhanced.plugins.Exporter.exportGrid

    • parameters:
      • type: (typeof string)
        A registered export format name
      • args: (typeof object)
        includes:
        {
        fetchArgs: object?
        Any arguments for store.fetch
        writerArgs: object?
        Arguments for the given format writer
        }
      • onExported: (typeof function(string))
        Call back function when export result is ready
    • summary
      Export required rows(fetchArgs) to a kind of format(type)
      using the corresponding writer with given arguments(writerArgs),
      then pass the exported text to a given function(onExported).
    • tags: public
    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter.exportSelected

    • parameters:
      • type: (typeof string)
        A registered export format name
      • writerArgs: (typeof object)
        Arguments for the given format writer
    • returns
      String
    • summary
      Only export selected rows.
    • tags: public
    • return_summary
      string
      The exported string
    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter._buildRow

    • parameters:
      • arg_obj: (typeof object)
      • writer: (typeof ExportWriter)
    • summary
      Use the given export writer(writer) to go through a single row
      which is given in the context object(arg_obj).
    • tags:
    • return_summary
      undefined
    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter._goThroughGridData

    • parameters:
      • items: (typeof Array)
      • writer: (typeof ExportWriter)
    • summary
      Use the given export writer(writer) to go through the grid structure
      and the given rows(items), then return the writer output.
    • tags:
    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter._isSpecialCol

    • parameters:
      • header_cell: (typeof dojox.grid.__CellDef)
    • returns
      Boolean
    • summary
      Row selectors and row indexes should be recognized and handled separately.
    • tags:
    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter._getExportWriter

    • parameters:
      • fileType: (typeof string)
      • writerArgs: (typeof object)
    • returns
      ExportWriter
    • summary
      Use the given export format type(fileType)
      and writer arguments(writerArgs) to create
      a ExportWriter and return it.
    • tags:
    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter.registerWriter

    • parameters:
      • fileType: (typeof string)
      • writerClsName: (typeof string)
    • summary
      Register a writer(writerClsName) to a export format type(fileType).
      This function separates the Exporter from all kinds of writers.
    • tags: public
    • type
      Function
  • dojox.grid.enhanced.plugins.Exporter.writerNames

    • type
      Object
  • dojox.grid.enhanced.plugins

    • type
      Object
  • dojox.grid.enhanced

    • type
      Object
  • dojox.grid

    • type
      Object
  • dojox

    • type
      Object