Closed GoogleCodeExporter closed 9 years ago
For boolean, or valueMapped fields, setting canToggle on a field means that
when the
user single-clicks on the field, the value is advanced to the next possible
value.
For boolean fields this toggles between true and false - for valueMapped fields
it
advances to the next option in the valueMap.
If you also have the editEvent set to ListGridEditEvent.CLICK as in this
example, the
editor (a select item) will then show, with the new value.
For a boolean field (showing a checkbox type editor) this is what you'd expect.
For a valueMapped field showing a select type editor, this is somewhat counter
intuitive.
So essentially this is working as designed though it's an odd use case - you
wouldn't
usually set canToggle on a valueMapped field if the grid's editEvent was click.
Can you comment on why you need canToggle to be true for this field?
Original comment by smartgwt...@gmail.com
on 21 Feb 2009 at 1:24
I don't need canToggle. It's just that i had a loop for creating all my field
and the
Toggle was set for all my fields. The doc doesn't clearly state that it choose
the
next value for a valueMap, it just talks about the behavior in the case of a
boolean
field. So, maybe the comment of the method should be updated to reflect the
behavior
in such an odd case ;-)
Thank for your reply
Original comment by ricard.i...@gmail.com
on 23 Feb 2009 at 9:14
Original comment by sanjiv.j...@gmail.com
on 23 Feb 2009 at 10:01
Original issue reported on code.google.com by
ricard.i...@gmail.com
on 6 Feb 2009 at 10:40