[Dojo-interest] Filtering select in EnhancedGrid
Nick
ngupta79 at gmail.com
Fri Jun 11 16:04:59 EDT 2010
For anyone who might be facing the same problem now or in future -
reloading of the grid again and again - It was the property autoHeight
of the grid that was causing the issue.
Nick
On 6/10/2010 7:34 PM, Nick wrote:
> Hey Jess,
>
> Thanks a lot, i really appreciate your help..I got my code working...i
> just moved my store from outside the init function, to into the init
> function ..and weirdly it stopped reloading ...magically..i am not sure
> what happened by doing that ..but it did resolve the problem.
>
> But Thanks to you - Jess, and Chris for helping me.
>
> Nick
>
>
>
> On 6/10/2010 1:50 PM, Jesse Meek wrote:
>> 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
>>>> <mailto: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
>>> <mailto: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
>
>
> _______________________________________________
> 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
>
More information about the Dojo-interest
mailing list