[Dojo-interest] Filtering select in EnhancedGrid

Christopher Barrett christopher.barrett at doit.wisc.edu
Thu Jun 10 15:04:59 EDT 2010


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];
>>>               }
>>>           }
>>>       }
>>>  }
>>>
>



More information about the Dojo-interest mailing list