Opened 10 years ago

Closed 9 years ago

#15703 closed defect (duplicate)

setFilter() in dojox.grid.EnhancedGrid does not change value of condition box

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


If using setFilter, the values in the condition field of FilterDefDialog? are not adjusted. Independent of the defined type, the operands for type 'string' are shown.

this.grid_.setFilter([{type: 'date', column: 0, condition: 'equalto',value: new Date()}] 'logicall');

The code results in showing the string operands, instead of the date operands. Same for type 'number'.
I recognized, that this is because of the behavior of the load method in FilterDefDialog?. First they are set to a nothing-doing method and afterwards they are attached again, but with a timeout (0).
When adding the method to adjust the values outside of the onChange event, the event is fired afterwards and sets the value to the default value instead of the value defined in setFilter
The provided patch, uses a different approach by calling set("value", ..., false). As far as I know, this is supported in all dijit widgets. And of course the patch contains a modification to adjust the operands during the load method.

regards, Philipp

Attachments (1)

FilterDefDialog.js (1.1 KB) - added by phil0135 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by phil0135

Attachment: FilterDefDialog.js added

comment:1 Changed 9 years ago by phil0135

Seems to be a duplicate of and is fixed in 1.8.1.

comment:2 Changed 9 years ago by bill

Resolution: duplicate
Status: newclosed

Duplicate of #14384.

Note: See TracTickets for help on using tickets.