Opened 14 years ago

Closed 14 years ago

#5433 closed defect (worksforme)

Dojo Grid editor restore bug

Reported by: guest Owned by: sorvell
Priority: high Milestone: 1.2
Component: DojoX Grid Version: 1.0
Keywords: Cc: benschell
Blocked By: Blocking:

Description (last modified by Bryan Forbes)

Dojo level: 1.0

Error message: TypeError?: c.editor has no properties

Name: [email protected]

In my 6 page wizard flush with Dojo Grids, on one page I have a grid with a NumberTextBox? editor in one of the columns. This cell column not only has a formatter, but also an observer:

{name: 'Other Site Fee', width: "100px", headerStyles: 'font-weight: bold; font-size: 11px;text-align: center;', styles: 'font-family: Arial, Helvetica, sans-serif; font-size: 11px; text-align: right;', editor: dojox.grid.editors.Dijit, editorClass: 'dijit.form.NumberTextBox', formatter: wiz5FormatMoney},

var wiz5ModelObservers = {
    modelDatumChange: function(inDatum, inRowIndex, inFieldIndex){
        wiz5DatumChanged(inDatum, inRowIndex, inFieldIndex);


  1. edit this cell on the page, entering a value
  2. click return to finish editing the cell
  3. go to the next page
  4. Go back to return to the original page, I get an error:

TypeError?: c.editor has no properties.

I chased it down to the restore function in dojox/grid/_grid/edit.js, and putting in a null check, it fixes the problem, though I suspect that is not the true and ultimate fix, but it gets around the problem for now:

	restore: function(inView, inRowIndex){
		// summary:
		//	restores the grid editing state
		// inRowIndex: int
		//	grid row index
		// inView: object
		//	grid view
		var c =;
		if(this.isEditRow(inRowIndex) && c.view == inView){
**  if (c.editor !== undefined && c.editor !=null) **

Change History (9)

comment:1 Changed 14 years ago by Adam Peller

Component: EditorDojoX Grid
Description: modified (diff)
Owner: changed from liucougar to sorvell

comment:2 Changed 14 years ago by dylan

Milestone: 1.2
Priority: highnormal

comment:3 Changed 14 years ago by guest

If possible, I'd like to request the milestone to be set for the 1.1 release.

I have encountered this issue with my users and found that you can recreate the problem using one of the grid tests cases.

Test Case: Use /dojox/grid/tests/test_grid.html


  1. open page
  2. double click on a row near the top
  3. scroll to bottom of grid using keyboard down arrow.
  4. scroll to top of grid using keyboard up arrow.
  5. should encounter error "c.editor has no properties"

Tom Kesling

comment:4 Changed 14 years ago by Adam Peller

Cc: benschell added
Milestone: 1.21.1

a simple if(c.editor) should suffice?

comment:5 Changed 14 years ago by benschell

I can't recreate this bug using the current trunk. Specifically, the test case indicated by Tom doesn't use editors (double-clicking on a row doesn't open an editor).

At least with respect to Comment #3, this may have been addressed with the fixes in keyboard navigation with the grid (#4848). I'm not sure though.

Tom, any other suggestions on re-creating this? I tried the same with /dojox/grid/tests/test_edit.html but still couldn't get it to happen as described.

comment:6 Changed 14 years ago by sorvell

Milestone: 1.11.2

comment:7 Changed 14 years ago by Bryan Forbes

Description: modified (diff)
Resolution: fixed
Status: newclosed

I also can't reproduce. I'm marking fixed.

comment:8 Changed 14 years ago by Adam Peller

Resolution: fixed
Status: closedreopened

comment:9 Changed 14 years ago by Adam Peller

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.