Opened 7 years ago

Closed 7 years ago

#16723 closed feature (patchwelcome)

EnhancedGrid : exporter with formatters bug

Reported by: Xiou Owned by: Evan
Priority: undecided Milestone: tbd
Component: DojoX Grid Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description

On export, "technical" values are not replaced by "formatted" values.

Sorry, I don't know how to create a patch...

"Class" dojox.grid.enhanced.plugins.exporter._ExportWriter:

	_getExportDataForCell: function(rowIndex, rowItem, cell, grid){
		var data = (cell.get || grid.get).call(cell, rowIndex, rowItem);
		if(this.formatter){
			return this.formatter(data, cell, rowIndex, rowItem);
		}else{
			return data;
		}
	},

Must be replaced by:

	_getExportDataForCell: function(rowIndex, rowItem, cell, grid){
		var data = (cell.get || grid.get).call(cell, rowIndex, rowItem);
		if(cell.formatter){
			return cell.formatter(data, cell, rowIndex, rowItem);
		}else{
			return data;
		}
	},

Change History (3)

comment:1 Changed 7 years ago by erikasrx

You can override the _getExportDataForCell function by simply placing fixed function in your exporter implementation.

comment:2 Changed 7 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:3 Changed 7 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.