ComboBox inside a datagrid

Hi all,
How can I put a comboBox inside a datagrid?
I want to set the comboBox with their own dataprovider and
the id should
pass to the datagrid fill at the save time.
I try this but doesnt let me to include a dataprovider.
Any links??
please help and thank you in advance.
JFB
<mx:DataGridColumn headerText="Rate" dataField="rate"
editable="false">
<mx:itemRenderer>
<mx:Component>
<mx:VBox>
<mx:ComboBox id="rate_cb"></mx:ComboBox>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>

Hi,
I think you need to declared your array public at the
begining of the page
like
[Bindable]
public var dataArray = new ArrayCollection();
You need to use outerDocument.
<mx:ComboBox activate="true" labelField="TEXT"
dataProvider="{outerDocument.dataArray}" />
I discover that the components are case sensitive also.
I hope this help.
JFB
"MLK_SS" <[email protected]> wrote in
message
news:[email protected]...
> Hi All,
>
> I am having a problem displaying data into a combo box
inside a data grid.
>
> I am getting data from a webservice and storing the data
into a Array
> Collection variable and trying to pass the var as the
data provider for
> the
> combo box.
>
> If I try an individual combo box it works fine.
>
> But, when trying to integrate into a datagrid it gives
an error saying
> Access
> of undefined property. I tried using outerDocument as
mentioned above, the
> error doesnot show up but the output does not show up
with the data inside
> the
> Data grid Combo box.
>
> <mx:DataGrid id="fav" x="10" y="332"
headerColors="[#C3D3AA, #C3D3AA]"
> enabled="true" editable="true"
textDecoration="underline">
> <mx:columns>
> <mx:DataGridColumn width="120" headerWordWrap="true"
> headerText="Fav./Del./ Copy/Edit" fontWeight="bold"
editable="false"
> dataTipField="Favourites" activate="true" >
> <mx:itemRenderer>
> <mx:Component>
> <mx:VBox>
> <mx:ComboBox activate="true" labelField="TEXT"
> dataProvider="{dataArray}" />
>
> </mx:VBox>
>
> </mx:Component>
> </mx:itemRenderer>
> </mx:DataGridColumn>
> </mx:columns>
> </mx:DataGrid>
>
> the function that handles the data result is :
>
> public function handleResult(event:ResultEvent):void{
>
> dataArray = new ArrayCollection();
>
> tasktypeArray = new ArrayCollection();
> var myXML:XML = new XML(event.result);
> var kf:XMLList = myXML.child("WORKLIST");
>
> var tasktype:XMLList = myXML.child("TASKTYPE");
> a = kf.item;
> b= kf.item[0].TEXT;
>
> textarea1.text = myXML.toXMLString();
> textarea3.text = myXML.child("TEMPLATE");
> trace(kf.child("TEXT").length());
> for (var x:int = 0; x < 25; x++) {
> var resultObj:Object = new Object ();
>
> resultObj.TEXT
> =tasktype.descendants("item")[x].TEXT.valueOf();
> dataArray.addItem(resultObj);
>
> }
>
> Please let me know where I am going wrong
>
> Thanks,
>
>

Similar Messages

  • ComboBox inside datagrid

    Hi All,
    Let me start with this issue again, maybe someone else can
    help me.
    I have a comboBox inside a datagrid, preview here in this
    group somebody
    show me how to create an event in my datagrid to do my
    calculations
    automatic.
    My problem is that after select an Item in the comboBox I
    have to click
    somewhere else to fire the event.
    Anybody have an idea or sugestion in how to fix this???
    I will include my code below... tks in advance.
    JFB
    public function setDataPrice(event:DataGridEvent):void{
    if(event.dataField == "serviceItemID") {
    // Disable copying data back to the control.
    event.preventDefault();
    var chosenItem:Object =
    ComboBox(event.currentTarget.itemEditorInstance.dataService_cb).selectedItem;
    var chosenId:int = chosenItem.id;
    acData[data_dg.selectedIndex].serviceItemID =
    Number(chosenId);
    acData[data_dg.selectedIndex].price =
    chosenItem.serviceItemPrice;
    acData[data_dg.selectedIndex].rate1000 =
    chosenItem.serviceItemRate;
    acData.refresh();
    // Close the cell editor.
    data_dg.destroyItemEditor();
    // Notify the list control to update its display.
    data_dg.dataProvider.notifyItemUpdate(data_dg.editedItemRenderer);
    if(event.dataField == "qty") {
    if (event.currentTarget.itemEditorInstance.text != ""){
    acData[data_dg.selectedIndex].qty =
    Number(event.currentTarget.itemEditorInstance.text);
    acData.refresh();
    <mx:DataGrid id="price_dg"
    itemEditEnd="calculateRateTotal(event)" x="10"
    y="32" width="590" height="147" editable="true">
    <mx:columns>
    <mx:DataGridColumn headerText="Quantity" dataField="qty"
    labelFunction="formatNumber"/>
    <mx:DataGridColumn headerText="Rate Type" dataField="id"
    rendererIsEditor="true" editorDataField="dummy"
    width="120">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:ComboBox id="rate_cb"
    dataProvider="{outerDocument.acRate}"
    labelField="label" width="120"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>

    Anybody else can help me with this.
    Tks
    JFB
    "JFB" <[email protected]> wrote in message
    news:[email protected]...
    > Hi All,
    > Let me start with this issue again, maybe someone else
    can help me.
    > I have a comboBox inside a datagrid, preview here in
    this group somebody
    > show me how to create an event in my datagrid to do my
    calculations
    > automatic.
    > My problem is that after select an Item in the comboBox
    I have to click
    > somewhere else to fire the event.
    > Anybody have an idea or sugestion in how to fix this???
    > I will include my code below... tks in advance.
    >
    > JFB
    >
    > public function setDataPrice(event:DataGridEvent):void{
    > if(event.dataField == "serviceItemID") {
    > // Disable copying data back to the control.
    > event.preventDefault();
    >
    > var chosenItem:Object =
    >
    ComboBox(event.currentTarget.itemEditorInstance.dataService_cb).selectedItem;
    > var chosenId:int = chosenItem.id;
    >
    > acData[data_dg.selectedIndex].serviceItemID =
    > Number(chosenId);
    > acData[data_dg.selectedIndex].price =
    > chosenItem.serviceItemPrice;
    > acData[data_dg.selectedIndex].rate1000 =
    > chosenItem.serviceItemRate;
    > acData.refresh();
    > //
    >
    > // Close the cell editor.
    > data_dg.destroyItemEditor();
    >
    > // Notify the list control to update its display.
    >
    >
    data_dg.dataProvider.notifyItemUpdate(data_dg.editedItemRenderer);
    > }
    >
    > if(event.dataField == "qty") {
    > if (event.currentTarget.itemEditorInstance.text != ""){
    > acData[data_dg.selectedIndex].qty =
    > Number(event.currentTarget.itemEditorInstance.text);
    > acData.refresh();
    > }
    > }
    >
    > }
    >
    > <mx:DataGrid id="price_dg"
    itemEditEnd="calculateRateTotal(event)" x="10"
    > y="32" width="590" height="147" editable="true">
    > <mx:columns>
    > <mx:DataGridColumn headerText="Quantity"
    dataField="qty"
    > labelFunction="formatNumber"/>
    > <mx:DataGridColumn headerText="Rate Type"
    dataField="id"
    > rendererIsEditor="true" editorDataField="dummy"
    width="120">
    > <mx:itemRenderer>
    > <mx:Component>
    > <mx:VBox>
    > <mx:ComboBox id="rate_cb"
    dataProvider="{outerDocument.acRate}"
    > labelField="label" width="120"/>
    > </mx:VBox>
    > </mx:Component>
    > </mx:itemRenderer>
    > </mx:DataGridColumn>
    >

  • Combobox behavior inside a datagrid cell

    How do you control the width of a combobox that resides
    inside a datagrid cell? Merely setting cb.dropdownWidth = "some
    value" does not work.

    ok.. i got it. You can successfully modify
    dropdownWidth from withing your CellRenderer class using the 'open'
    event.

  • Dynamic binding of a DataGridTemplateColumn with a ComboBox inside

    Hi all and thank you in advance.
    I wish you could help me 'cause I'm quite a newbye in this world (C# and WPF).
    I need to bind a ComboBox field inside a DataGrid with some data.
    The DataGrid is filled with a collection.
    I need that one or more data from one field (or more) of this collection is bound with data from another DataSet (and collection).
    I need this binding as DYNAMIC and not STATIC:
    if I add a record in the second collection I need this record is avaible in the other collection (DataGrid "collection" before)
    Any suggestion?
    Edit:
    obviously with "if I add" I mean:
    if I add one record in the table I need this record in the ComboBox content of the ComboBox field inside the DataGrid filled with the other collection...

    Ummm... obviously is not a word I would use there mate.
    It's Friday evening and been a tiring week but I'm a bit confused by your explanation.
    I'm guessing you're kind of OK with an observablecollection bound to itemssource of your datagrid.
    If not bind a.... ditto.
    Observablecollection tells you + and - to that collection but not properties.
    You have to implement inotifypropertychanged to do that.
    Then add some notification from your setters on each property.
    kinda like
    using GalaSoft.MvvmLight;
    namespace wpf1
    public class Class1 : ViewModelBase
    private int myVar;
    public int MyProperty
    get
    return myVar;
    set
    myVar = value;
    RaisePropertyChanged();
    Binding comboboxes in datagrids is tricky.
    You have several options.
    You mention datasets and collections.
    I'm going with collection here.
    The thing to realise about the wpf datagrid is datacontext.
    The datacontext of the row is an item in the collection the itemscollection is bound to.
    If you bind a collection of customer then it's in customer it looks for any binding.
    It has to use a bit of weird notation to get to the datacontext of the window.
    That's one route to your data.
    Another is to have an observable collection as a resource.
    http://social.technet.microsoft.com/wiki/contents/articles/26347.wpf-combobox-binding-in-datagrid.aspx
    http://social.technet.microsoft.com/wiki/contents/articles/26200.wpf-dynamicresource-observablecollection.aspx
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Dynamic comboBox in a dataGrid?

    i have a dataGrid that starts out blank. When a button is
    clicked, it populates based on the contents of a few components.
    The 3rd column needs a comboBox. I need the following
    behaviors:
    1-when the button is clicked, this populates with the text
    values in a certain text field.
    2-under certain circumstances, i need to be able to add and
    subtract from this comboBox.
    i have read this:
    http://blog.flexmonkeypatches.com/2008/02/18/simple-datagrid-combobox-as-item-editor-examp le/
    but it looks like the comboBox in that example has fixed
    values. How can i dynamically alter the values in
    these comboBoxes? i have the comboBoxes in the dataGrid
    component, but i can't figure out how to access their
    dataProviders!
    thanks!

    You can have your comboBox itemRenderer populate based on an
    ArrayCollection in your dataDrid dataProvider. Then, by changing
    the dataProvider's ArrayCollection field, you could change each of
    the comboBoxes accordingly. If you need different comboBox values
    for different comboBoxes, then you will need something a bit
    different. It would help to see your code.
    Vygo

  • ComboBox embedded in DataGrid

    Hi,
    I want to embedded a ComboBox in a Datagrid.
    The data displays in the Combox with the code in the
    ComboBoxCellRenderer.as:
    public function set data(value:Object):void {
    _data = value;
    var dp:DataProvider = new DataProvider(value.plaats);
    dataProvider = dp;
    public function get data():Object {
    _data.plaats = arr;
    return _data;
    -How can I transmit the ComboBox.selectedItem to the Datagrid
    -and how can I read the CellRenderer.data in the DataGrid,
    var cr: ComboBoxCellRenderer =
    Datagrid.itemToCellRenderer(e.item) as ComboBoxCellRenderer
    =>returns null
    trace(cr.data);
    Thanks for helping me

    Hi,
    I'm sorry to bug you with a non-technical discussion, but I
    am a recruiter in San Diego. My client is in need of 3 Senior Flex
    Developers for their project. I have had an extremely rough time
    finding someone for this position. Would you be interested in this
    position, or do you know of anyone that might be? We do pay
    referral fees. This position may be open to telecommuting.
    Job Description:
    They are in the midst of a major re-architecting of their
    Corporate Management system utilizing many cutting edge
    technologies. As it relates to the position they are using Flex as
    their UI.
    This is either a contract, or a full-time position.
    Pay: Market Rate
    Thanks for your help!
    Natalie Fay
    Outsource Technical
    www.ostechnical.com
    [email protected]
    858.874.5637

  • How do I change the style of a subset of rows inside a Datagrid?

    How do I change the style of a subset of rows inside a
    Datagrid? I have tried dgExample.selectedItem.fontWeight="bold" but
    that does not work. What should I do?
    Please help.

    I see where you mean but I'm not familiar with the 'language'
    of CSS. Currently, the background of the body (or probably the div
    container) is set to none on this page. So visually, I have a white
    background with black letters. I want to place a gradient image in
    this container instead of the 'none'. The coding with "none isn't
    even the CSS code because I vaguely remember deleted it because I
    thought I would never need it. So can you tell the CSS code I need
    to place this image in the #container (I think that's where it
    should go) and where? Thanks. I've included the little piece of
    code where I think it should go in somewhere. Thanks for the help.
    <link href="../CSS/twoColFixLtHdr.css" rel="stylesheet"
    type="text/css" /><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional
    comment */
    .twoColFixLtHdr #sidebar1 { width: 230px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional
    comment */
    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixLtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout
    it needs to avoid several bugs */
    </style>
    <![endif]-->
    <style type="text/css">
    <!--
    -->
    </style>
    <link href="../css/global.css" rel="stylesheet"
    type="text/css" />
    <script src="../SpryAssets/SpryMenuBar.js"
    type="text/javascript"></script>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css"
    rel="stylesheet" type="text/css" />
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    </head>
    Lou
    quote:
    Originally posted by:
    Newsgroup User
    Redefine the CSS for ".twoColFixLTHDR #container" in the page
    itself,
    below the link to the external style sheet.
    JMS

  • Accordion inside flex datagrid

    Trying to put an accordion inside a datagrid where the header has typical datagrid functionality on each set of columns. Each accordion has a seperate dataset inside. Is thi possible using rendering or will I have to build  custom set of functions to have it behave like a datagrid with colun sorting, dragging, etc.

    Basically I am looking to have one main header that controls six accordions, each with data from the same souce but filtered dynamically. The main header should still be able to be sorted and arrangable like a typical datagrid based on what accordion panel is currently open. I can provide a mock-up of what i want it to look like if this still is not clear. Its basically one datagrid header that can control 6 seperate datagrids(without headers) while being inside of an open accordion.

  • Unable to view ComboBox inside AdvancedDataGridColumn

    Hello,
    First I ahve to say that I am a beginner in Flex domain.
    I am trying to show options in combobox inside an AdvancedDataGridColumn. In total I have two columns. One is a regular data column and the other is a ComboBox. I am able to see the first column but not the combobox one. Below is the code snippet.
    I am not sure whats missing. Any help is really appreciated. I tried to lookup other examples but could not figureout whats missing.
    <mx:AdvancedDataGrid 
    id="assignmentDataGrid" alternatingItemColors="[#EEEEFF,#EEEEFF]" dataProvider="
    {filteredAvailableReports}" width="100%" rowCount="10">
    <mx:columns>
    <mx:AdvancedDataGridColumn id="reportName" headerText="Report Name" dataField="
    name" labelFunction="reportsListLabelFunction"/>
    <mx:AdvancedDataGridColumn id="ftpConnCol" headerText="FTP Options" editable="true" editorDataField="value">
    <mx:itemEditor>
    <mx:Component>
    <mx:ComboBox editable="true">
    <mx:dataProvider>
    <mx:ArrayCollection>
    <mx:String>User1</mx:String>
    <mx:String>User2</mx:String>
    <mx:String>User3</mx:String>
    <mx:String>User4</mx:String>
    </mx:ArrayCollection>
    </mx:dataProvider>
    </mx:ComboBox>
    </mx:Component>  
    </mx:itemEditor>
    </mx:AdvancedDataGridColumn>
    </mx:columns>
    </mx:AdvancedDataGrid>

    Check where you are generating to in your SSL properties. The chances are you are not generating to the SSL folder.

  • QTP Automation tool not recognizing LinkButton inside a DataGrid

    Hi all,
    I have been trying to generate automated script using QTP automation tool, to test my Flex application. I have a Custom DataGrid in which one of the column is a linkbutton. When I start my QTP recording and click on this linkbutton inside the datagrid, I see that this action is not being recorded or captured by the tool. I googled to see if anyone encountered a similar issue but had not luck with it,
    Could anyone help me with this issue?
    Thanks,
    Niki

    Hi There,
    Is it working . Because I am facing the same kind of problem, When I did spy the data grid coloums are getting identified as label and I'm not able to do click operation.
    I tryied using descriptive programming but still it is not identified.
    Thanks,
    Sylu

  • WPF Finding Selected ComboBox Item Within DataGrid

    Hi all... I'm having an issue trying to access the selected item value in a ComboBox within a DataGridTemplateColumn. 
    Through another question/answer I have got the ComboBox displaying the names as it should but the next step I'm having issues with is to be able to loop through each row in the DataGrid and determine the selected value of the ComboBox in that row as
    well as some other items and run some other code based on those values. 
    Any help would be appreciated. 
    Thanks,
    Greg
    <Grid>
    <DataGrid x:Name="gvDefaultCWWSchedule" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,109,10,214" AutoGenerateColumns="False" Grid.Row="0"
    AllowDrop="True" IsReadOnly="False" SelectionMode="Single" Background="Beige" CanUserAddRows="False">
    <DataGrid.Columns>
    <DataGridTemplateColumn Width="150">
    <DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <ComboBox Name="ddlUsers"
    ItemsSource="{Binding Path=Users}"
    DisplayMemberPath="{Binding Name, Mode=TwoWay}"
    SelectedValuePath="{Binding Uid, Mode=TwoWay}"
    SelectedIndex="{Binding Uid, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
    SelectionChanged="ComboBox_SelectionChanged"
    >
    <ComboBox.ItemTemplate>
    <DataTemplate>
    <StackPanel Orientation="Horizontal">
    <TextBlock Text="{Binding Name}" />
    </StackPanel>
    </DataTemplate>
    </ComboBox.ItemTemplate>
    </ComboBox>
    </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
    </DataGridTemplateColumn>
    <DataGridTextColumn Binding="{Binding WeekNumber}" />
    </DataGrid.Columns>
    </DataGrid>
    <Button Content="Button" HorizontalAlignment="Left" Margin="729,32,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
    </Grid>
    public partial class Test : Window
    public Test()
    InitializeComponent();
    BindDefaultCWWSchedule();
    private void BindDefaultCWWSchedule()
    // THIS IS COMING FROM MY DB
    List<CurrentUser> UsersFinal = new List<CurrentUser>();
    UsersFinal.Add(new CurrentUser { Uid = 1, Name = "JOHN" });
    UsersFinal.Add(new CurrentUser { Uid = 2, Name = "BILL" });
    UsersFinal.Add(new CurrentUser { Uid = 3, Name = "MARY" });
    ObservableCollection<CWWDefaultScheduleWeek> DefaultSchedules = new ObservableCollection<CWWDefaultScheduleWeek>();
    DefaultSchedules.Add(new CWWDefaultScheduleWeek { Users = UsersFinal, WeekNumber = 1, SelectedUser = null });
    DefaultSchedules.Add(new CWWDefaultScheduleWeek { Users = UsersFinal, WeekNumber = 2, SelectedUser = null });
    DefaultSchedules.Add(new CWWDefaultScheduleWeek { Users = UsersFinal, WeekNumber = 3, SelectedUser = null });
    DefaultSchedules.Add(new CWWDefaultScheduleWeek { Users = UsersFinal, WeekNumber = 4, SelectedUser = null });
    gvDefaultCWWSchedule.ItemsSource = DefaultSchedules;
    private void Button_Click(object sender, RoutedEventArgs e)
    var rows = gvDefaultCWWSchedule.ItemsSource;
    ObservableCollection<CWWDefaultScheduleWeek> CWWSchedAssignments = new ObservableCollection<CWWDefaultScheduleWeek>();
    foreach (var row in rows)
    CWWDefaultScheduleWeek r = (CWWDefaultScheduleWeek)row;
    // FOR EACH ROW HERE I'M WANTING TO CREATE A LIST OF ITEMS AND RUN FURTHER CODE BASED ON IT... ISSUE IS FINDING THE ACTUAL SELECTED USER ON EACH ROW...
    CWWSchedAssignments.Add(new CWWDefaultScheduleWeek
    Users = r.Users,
    SelectedUser = r.SelectedUser,
    WeekNumber = r.WeekNumber
    private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    gvDefaultCWWSchedule.CommitEdit();
    public class CWWDefaultScheduleWeek
    public IEnumerable<CurrentUser> Users { get; set; }
    public CurrentUser SelectedUser { get; set; }
    public int WeekNumber { get; set; }
    public class CurrentUser
    public int Uid { get; set; }
    public string Name { get; set; }

    In a way, wpf is similar to web.
    More so than windows forms anyhow.
    XAML is mark up and flows like html.
    You have padding and margin which are rather familiar concepts.
    Whereas windows forms is absolute positioning and... well totally different from markup.
    You might find this sample interesting as a sort of mvvm taster.
    https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
    and event handling equivalents
    http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
    Note
    With a combo you bind the selecteditem to a propfull and then you can put a method call in the setter.  That will then be invoked when the user changes selection.
    Good luck and welcome to wpf development.
    It's a great technology.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • How to use combobox to filter datagrid in Flash Builder 4?

    Hi,
    I've been working through the TestDrive application with Flash Builder 4 and I would like to learn how to filter a datagrid using a combobox.  I've googled the subject and results for many different versions of Flash, some which look like they will take a considerable amount of time to implement.  I'm hoping with Flash Builder 4 there is a straight-forward way to do this without writing pages of code.
    I think I may be close to getting this working by passing the combobox value into a PHP script which queries the database with a WHERE clause.
    Thakns,
    David

    I was able to get the data returned from a PHP call into an array by placing the following in the service result handler:
       public var myEmployeesArray : Array;
       [Bindable]
       public var myEmployeesDataProvider : ArrayCollection;
        myEmployeesArray = mx.utils.ArrayUtil.toArray(event.result);
        myEmployeesDataProvider = myEmployeesArray[0];   //data provider for the datagrid
    Not certain how to use filterfunction yet though.  I started to read this page but need to work on it more: http://cookbooks.adobe.com/post_Using_the_to_ArrayCollection_s_filterFunction-5441.html
    I'd like to filter only one field in the ArrayCollection.
    Also, for anyone else who may be learning while reading this, I found the following page helpful in figuring out how to load the PHP service return data into an array:
    http://www.cflex.net/showFileDetails.cfm?ObjectID=415
    David

  • Two comboBox in a datagrid

    Hi All,
    When I create a new line in my grid I want to include two
    comboBox, the
    second comboBox related to the first one.
    I got it work partial, I can create the second combo on the
    fly but how can
    I insert the combo into the grid for specific row and column.
    The column is the same but the row change if I add one.
    Thanks
    JFB

    Yes? but how in a dynamic form?
    This is what I'm doing... my setCategory function fill the
    array for the
    second comboBox but this only work for one row in my datagrid
    because if I
    set the second row in my datagrid and I change the option in
    my first
    comboBox it change the values for all second comboBox values.
    Now I can create a new comboBox on the fly but if I say
    comboBox.id =
    "materialItem_cb" it doesn show in the datagrid.
    How can I do this? Please help... I'm trying different things
    without luck
    Tks
    JFB
    public function setCategory(tempCombo:ComboBox):void{
    acMaterialsItem.removeAll();
    for each (var item:Object in acAllItems) {
    if (item.itemCategoryID == tempCombo.selectedItem.id) {
    acMaterialsItem.addItem(item);
    <mx:DataGridColumn headerText="Category"
    dataField="itemCategoryID"
    editable="false" width="150">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:ComboBox id="category_cb"
    dataProvider="{outerDocument.acItemCategory}"
    labelField="label"
    change="outerDocument.setCategory(category_cb)"
    width="150"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <mx:DataGridColumn headerText="Material Description"
    dataField="materialItemID" editable="false" width="200">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:ComboBox id="materialItem_cb"
    dataProvider="{outerDocument.acMaterialsItem}"
    labelField="label"
    width="200"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    "ntsiii" <[email protected]> wrote in message
    news:f98ags$h40$[email protected]..
    > This must be handled by your item renderer.
    >
    > Tracy

  • Placing a Button inside a TextBox - RadioButtons inside a Datagrid

    Hi,
    I would like to place a small button inside a textbox, so that when the button is clicked it will popup a window showing a Datagrid. I will be using an arrayCollection to supply the data to the grid's dataProvider. I would like to have as the 1st column radiobuttons for each row of data in the grid. When any radiobutton is selected that row's data is populated into the textbox that the button is in. Is this functionality feasible? Any code to inplement this would be appreciated.
    Thanks,
    J

    OK so I have managed to create the Datagrid with 3 columns the 1st is called Select, 2nd is Subject and 3rd is Message. I used a TitleWindow in a separate mxml file to create the popup window that contains the Datagrid. As I want the 1st column of my grid to have RadioButtons for all rows that have data, how do I now get these appearing under the Select Column? When a RadioButton is selected and the popup window closed the selected row's data should be populated into a couple of textbox;s one for each of the columns data.
    I have not yet managed to get the button to sit inside a Textbox. As the textbox is among a number of controls displayed on the same line in a HBox, I can only get the button to sit along side the textbox, but would prefer it to be sitting inside the textbox.
    Any help would be appreciated?
    Thanks,
    J

  • Help with Comboboxes inside a repeater

    Hi, I have a problem that I really need some help, if anyone knows how to do it.
    I have to make in flex a dynamic form that has X questions and each question can be answered 3 times by sellecting Y options in a combobox. As you can Imagine the number of questions and answers can change.
    Something like this:
    QUESTION                          FIRST ANSWER   2nd ANSWER      3rd ANSWER
    1- Which option do you like?  Combobox: A      Combobox: C        CB: A
    2- Second Question?             Combobox: B      Combobox: C        CB: D
    3- Third Question?                 Combobox: A      Combobox: Blank  CB: B
    (CB: means Combobox - I just made it shorter so it could fit the window)
    I managed to correctly using a repeater show all the questions and each combobox has all the right options inside. All I want now is to get the data from those comboboxes.
    This is a Simplified code (I removed all the non-essencial stuff) so you can get an idea:
    <mx:Repeater id="rp">
    <mx:VBox label="{rp.currentItem.nome}"
    width="100%">
    <mx:Repeater id="qt"
    dataProvider="{rp.currentItem.tbdavaliacao_pergunta}">
    <mx:HBox width="100%"
    verticalAlign="middle"
    horizontalAlign="center">
    <!-- This is the question text -->
    <mx:Text text="{String(qt.currentItem.nome)}"
    textAlign="center"/>
    <!-- Next, are the 3 comboboxes that are repeated X times -->
                                            <mx:ComboBox dataProvider="{grau}"
                                                           id="auto"
                                                           textAlign="center">
                                             </mx:ComboBox>
                                            <mx:ComboBox dataProvider="{grau}"
                                                           id="superior"
                                                           textAlign="center">
                                            </mx:ComboBox>
                                            <mx:ComboBox dataProvider="{grau}"
                                                           id="resultado"
                                                           textAlign="center">
                                            </mx:ComboBox>
    </mx:HBox>
    </mx:Repeater>
    </mx:VBox>
    </mx:Repeater>
    Anyone has an idea of how can I get all the answers from all my dynamic comboboxes?
    The perfect AND ideal solution would be having X Dynamic objects with the question id + the combobox id storing the answer sellected.
    So I would know that the question 32 has the answers A, B and A for an example.
    qt.currentitem.id + combobox.id = selectedLabel
    (question ID) + (combobox id) = (selectedLabel)
    32auto = 'A'
    32superior = 'B'
    32resultado = 'A'
    Or just one arraycollection with all the answers...
    At this point, I would accept any answer or idea or sollution...
    Thanks a lot!!

    I've looked at the HR schema to provide an example
    From the EMPLOYEES table I would like to return the EMPLOYEE_IDs of the employees with the highest SALARY per JOB_ID. When considering the employees that have the same JOB_ID, if any of the employees have a MANAGER_ID of x then no employee is returned for that group of employees with the same JOB_ID. x will be passed in as a parameter to my procedure.
    Example
    MANAGER_ID of 99 passed in
    All of the EMPLOYEE_IDs with the max SALARY per JOB_ID returned - no one has a manager with MANAGER_ID of 99
    MANAGER_ID of 101 passed in
    101 returned - Neena has the max salary of all the AD_VPs and neither of the AD_VPs has a MANAGER_ID of 101 (ok I know this isn't true about the salary!)
    102 returned - Alexander has the max salary of all IT_PROGs and none of them has MANAGER_ID of 101
    (108 not returned as Nancy has MANAGER_ID of 101)
    109 returned - Daniel has the max salary of all the FI_ACCOUNTs and none of them has MANAGER_ID of 101
    etc... for all JOB_IDs
    MANAGER_ID of 102 passed in
    101 returned - Neena has the max salary of all the AD_VPs and neither of the AD_VPs has a MANAGER_ID of 102 (ok I know this isn't true about the salary!)
    (no IT_PROGs returned as Alexander has MANAGER_ID of 102)
    108 returned - Nancy has max SALARY and not a MANAGER_ID of 102
    109 returned - Daniel has the max salary of all the FI_ACCOUNTs and none of them has MANAGER_ID of 102
    etc... for all JOB_IDs
    MANAGER_ID of 103 passed in
    101 returned - Neena has the max salary of all the AD_VPs and neither of the AD_VPs has a MANAGER_ID of 103 (ok I know this isn't true about the salary!)
    (no IT_PROGs returned as several have MANAGER_ID of 103)
    108 returned - Nancy has max SALARY and not a MANAGER_ID of 103
    109 returned - Daniel has the max salary of all the FI_ACCOUNTs and none of them has MANAGER_ID of 103
    etc... for all JOB_IDs
    Hope this helps to explain things, and thanks to anyone that can help
    Rob

Maybe you are looking for