On Sat, Jan 3, 2009 at 12:16 AM, Mike Oliver <moli...@corenttech.com> wrote:

[snip]
> and that saves to the database, all great...however, the
>
> editorDataField="selectedItem" puts "[object Object]" into the Grid instead
> of the data element.
>
> I tried editorDataField="selectedItem.data" but that fails.  I tried "value"
> and "text" but it saves the Label.
>
> So what do I put in the editorDataField to save the 'data' to the Grid
> instead of the object string or the label?

Strange. Setting editorDataField to 'value' should work if you have a
field called 'data' in the selected item and that's the value you're
looking for.

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
  xmlns="*" >

  <mx:TextInput text="{cb.value}" />

  <mx:ComboBox labelField="l" id="cb">
    <mx:dataProvider>
      <mx:Object l="foo" data="1" />
      <mx:Object l="bar" data="2" />
    </mx:dataProvider>
  </mx:ComboBox>

</mx:Application>

Manish

-- 
http://manishjethani.com

Reply via email to