PDA

View Full Version : Flex Datagrid - headerRenderer Combobox problem


lacus
08-07-2009, 11:53 AM
Hi all,

I would like to make an editable datagrid with filtering in the header.

The filtering width TextInput control works fine, but I want to filter with ComboBox too. And I can't make work the ComboBox.

Problem with the ComboBox:
if you click anywhere in the datagrid to edit an item, the value of datagrid will be set to default (to the first item in the ComboBox), further I don't now, how I get the value of this header datagrid.

Any idea?

the problematic datagid (http://www.bodlaszlo.hu/flex/test.swf)

source of test.swf (http://www.bodlaszlo.hu/flex/test.txt)

source of ComboHeaderRenderer (http://www.bodlaszlo.hu/flex/ComboHeaderRenderer.txt)

source of TextHeaderRenderer (http://www.bodlaszlo.hu/flex/TextHeaderRenderer.txt)

Thanks for help!

lacus


ps:Im sorry for my poorly English

wvxvw
08-07-2009, 03:06 PM
http://blog.flexexamples.com/2008/05/12/using-a-numericstepper-control-as-an-item-editor-for-a-datagrid-control-in-flex/#more-627
See this example, it uses NumericStepper instead of ComboBox, but it shouldn't be much of a difference.

lacus
08-07-2009, 07:05 PM
I've seen this example, but there is the NumericStepper Component in the DataGrid and not in the DataGrid header. It's all right setting a ComboBox in the grid or in the header.

My problem is, if I change the value in the header ComboBox and I click after any editable item in the grid, the comboBox change to his first item. Try the first link I've given and you can see it.

wvxvw
08-08-2009, 02:09 AM
I'm getting error in your first example...
TypeError: Error #1010: A term is undefined and has no properties.
at MethodInfo-2390()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.controls::ComboBox/dispatchChangeEvent()
at mx.controls::ComboBox/close()
at mx.controls::ComboBox/dropdown_changeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.controls.listClasses::ListBase/mouseUpHandler()
at mx.controls::List/mouseUpHandler()

MethodInfo-2390() must be some anonymous function you've created...