[Dojo-interest] Filtering select in EnhancedGrid

Jesse Meek waigani at gmail.com
Thu Jun 10 16:50:32 EDT 2010


Hey Nick,

I've just tackled this one and have it working. It took a month of  
head scratching and hanging out on #dojo - lots of thanks to kgf too.  
Without further adieu:

http://jsbin.com/otobi3/11

enjoy,
Jess







On 11/06/2010, at 8:17 AM, Nick wrote:

> The grid kept reloading every second...and i could see the logs that i
> added in the formatter being printed.
>
> Thanks Chris for your help!
>
> Nick
>
>
> On 6/10/2010 12:04 PM, Christopher Barrett wrote:
>> Nick, the whole page was reloading? Or just the grid?  When you  
>> double
>> click an editable field, it will go from text to the widget, so that
>> behavior is expected.
>> -Chris
>>
>> Nick wrote:
>>> Tried the code below ..it kind of works ..but in a strange way...my
>>> page kept on reloading...i can see the formatter being called after
>>> every second.. and that may be coz of the page kept reloading once i
>>> double clicked the cell and it changed into static text changed into
>>> drop down list. Any ideas what could be causing that?
>>>
>>> { field: 'field1',
>>>    name: 'colHeader1',
>>>    editable: 'true',
>>>    width: 'auto', align: 'left',
>>>    type: dojox.grid.cells._Widget,
>>>    widgetClass: "dijit.form.FilteringSelect",
>>>    widgetProps: {
>>>     name: "code",
>>>     store: droppingStore,
>>>     searchAttr: "name"
>>>         },
>>>    formatter:function(inDatum, inRowIndex){
>>>          for(var key in droppingStore._arrayOfAllItems){
>>>              var item = droppingStore._arrayOfAllItems[key];
>>>              if(item.code[0] == inDatum) {
>>>                  return item.name[0];
>>>              }
>>>          }
>>>      }
>>>  }
>>>
>>>
>>>
>>>
>>>
>>> On 6/10/2010 6:59 AM, Christopher Barrett wrote:
>>>> { field: 'field1',
>>>>>     name: 'colHeader1',
>>>>>     editable: 'true',
>>>>>     width: 'auto', align: 'left',
>>>>>     type: dojox.grid.cells.Select,
>>>>>     options:["ST","D1","D2","D3","D4","D5"],
>>>>>     formatter:function(inDatum, inRowIndex){
>>>>>           for(var key in droppingStore._arrayOfAllItems){
>>>>>               var item = droppingStore._arrayOfAllItems[key];
>>>>>               if(item.code[0] == inDatum) {
>>>>>                   return item.name[0];
>>>>>               }
>>>>>           }
>>>>>       }
>>>>>  }
>>>>>
>>>
>>
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://docs.dojocampus.org
>> Dojo-interest at mail.dojotoolkit.org
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20100611/267b3414/attachment-0001.htm 


More information about the Dojo-interest mailing list