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.

Similar Messages

  • 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,
    >
    >

  • How to enter a value into datagrid cell in wpf through manually?

    Hi,
        Here my datagrid rows are in readonly mode here how can i enter the values in to the datagrid cell.(means how can i edit the cell value).i am adding the value to datagrid through programetically, I think  for this reason my datagrid rows
    are visible in readonly mode. Then how can i edit. Please guide me.
    Regards,
    Bhadram

    Hi Barry,
       Thank you for your reply, Now i sending my sample please check it once and suggest me.
    MainWindow.xaml.cs
    private void Save_Click(object sender, RoutedEventArgs e)
     List<CustomerMainViewModel> customer = new List<CustomerMainViewModel>(); customerviewmodel.NameTextField = tbName.Text;
    customerviewmodel.AddressTextField = tbAddress.Text;
    customerviewmodel.CountryField = countryddl.Text;
    customerviewmodel.StateField = stateddl.Text;
    customerviewmodel.Product = customerviewmodel.Product1 + "," + customerviewmodel.Product2;
    foreach(string str in customerviewmodel.actionCollection)
    customerviewmodel.ActionColl.Add(str);
    customerviewmodel.actionCollection.Clear();
    customer.Add(customerviewmodel);
    dataGrid1.Items.Add(customer);
    MessageBox.Show("Data Successfully Saved", " MessageBox", MessageBoxButton.OK, MessageBoxImage.Asterisk);
    clearValues();
    MainWindow.xaml
    <DataGrid
    Height="144"
    HorizontalAlignment="Left"
    Margin="79,447,0,0"
    Name="dataGrid1"
    VerticalAlignment="Top" CanUserAddRows="True"
    Width="399" Grid.RowSpan="2" IsReadOnly="False">
    <DataGrid.Columns>
    <DataGridTextColumn Header="NAME" Binding="{Binding NameTextField,Mode=TwoWay}" Width="Auto" IsReadOnly="False" />
    <DataGridTextColumn Header="ADDRESS" Binding="{Binding AddressTextField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTextColumn Header="GENDER" Binding="{Binding GenderField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTextColumn Header="COUNTRY" Binding="{Binding CountryField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTextColumn Header="STATE" Binding="{Binding StateField,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTextColumn Header="PRODUCT" Binding="{Binding Product,Mode=TwoWay}" Width="Auto" IsReadOnly="False"/>
    <DataGridTemplateColumn Header="ACTION" MinWidth="140" IsReadOnly="False">
    <DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <ComboBox x:Name="actionddl" ItemsSource="{Binding ActionColl}"/>
    </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
    </DataGridTemplateColumn>
    </DataGrid.Columns>
    </DataGrid>
    In the above "xaml" file i am using the attribute "Readonly="False"" but its not effected on my code still my datagrid is in readonly mode, i don't know why it happens. 
    And I am adding data to my datagrid through "Wpf controls (TextBox,CheckBox,ComboBox and etc...)"  while click on "save" button the data added to grid. adding to grid works properly but the entire row is in readonly mode. How can
    i solve my problem.  

  • Adding MovieClip to DataGrid Cell

    Hi to all..
    I have added components like ComboBox, CheckBox etc in the
    DataGrid cell..
    But Now I want to add MovieClip If not possible then Swf in
    the DataGrid cell using cellrenderer.
    Is it possible to add such things.
    If yes can you guide me how..? I have spend 3 days after
    this... Please Help me out..
    Thanks.

    quote:
    Hi...
    I'm using AS3.
    By the way I have added Movieclip on the data grid cell...
    But now the problem is how to make it editable because I have
    added two components on the same cell...
    And that cell take this both component as object and you can
    not edit that object by just making that column as editable =
    true... so if any one can suggest me the way..
    the help will be appreciated......

  • Help needed to add an image to a datagrid cell in actionscript

    Morning all,
    I am still quite new to flex development and I have an application which uses xml to populate a datagrid. One of the row columns should display a small image but I don't know how to do that.
    Can anyone show me how to add an image to a datagrid cell in actionscript?
    I've added a sample of the code I have written already below. Any help would be much appreciated.
    Thanks in advance,
    Xander
    My XM
    <?xml version="1.0" encoding="UTF-8"?>
    <dataset>
    <modules>
    <module id="1">
    <icon>assets/sample_image1.png</icon>
    <key>core</key>
    <name>Core</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 15:59 UK</installed>
    </module>
    <module id="2">
    <icon>assets/sample_image2.png</icon>
    <key>webproject</key>
    <name>Web Project</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 17:32 UK</installed>
    </module>
    </modules>
    </dataset>
    My Actionscript
    private function dataSetHandler(event:Event):void {
        var ds:XML = new XML(event.target.data);
        var rows:XMLList = ds.elements('modules').elements('module') as XMLList;
        var columns:Array = new Array();
        for (var i:int=0; i<rows[0].elements().length(); i++) {
            var column:DataGridColumn = new DataGridColumn();
            var tag:String = rows.*[i].name();
            column.headerText = rows.*[i].name();
            column.dataField = rows.*[i].name();
            if (tag == 'icon') {
                var img:Image = new Image();
                img.id = "iconpath";
                img.width = 23;
                img.height = 20;
                img.source = rows.*[i].name();
               column.itemRenderer = img;   <-- this line shows as an error when I try to compile
            columns[i] = column;
        mydatagrid.columns = columns;
        mydatagrid.dataProvider = rows;

    you cant just set image object to itemrenderer, you need to use classfactory.
    http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_4.html

  • Oracle Maps doesn't work inside a table cell?

    Hello everyone,
    I have been using Oracle Maps without a table, but now I need to put the display (&lt;div&gt;) inside a table cell for organization purposes. I noticed that it simply doesn't display the map if I put it there.
    This works and displays the map:
    <body onLoad="loadMainMap()">
          <div id="map_div" style="left:0px; top:0px; width:100%; height:100%; border:2px solid"></div>
    </body>This doesn't display the map (The table and div are there, but no map is shown):
    <body onLoad="loadMainMap()">
        <table>
            <tr>
            <td>
                    <div id="map_div" style="left:0px; top:0px; width:100%; height:100%; border:2px solid"></div>
            </td>
            </tr>
        </table>
    </body>Am I doing something wrong?
    Thanks in advance,
    ~Ruben Jorge

    Hi Ruben,
    That's related to DIV and the inline style you've selected.
    You can try to change the div style with, for example :
    <!--
    <table border=1>
    <tr>
    <td>
    </td>
    <td>
    <div id="map" style="position:absolute;top:100px;bottom:400px;right:150px;left:150px;visibility:visible;overflow:hidden;border:1px"></div>
    </td>
    </tr>
    </table>
    -->
    Or give a try with DIV tables :
    <!--
    <body onload=javascript:showMap();>
    <h3> Exemplo Oracle Maps example - Display de um mapa utilizando DIVs</h3>
         <div id="container">
    <div id="row">
         <div id="left">
              <h4>Left Col</h4>
              <p>...</p>
         </div>
         <div id="map" style="width: 800x; height: 400px">
              <h4>Middle Col</h4>
         </div>
         <div id="right">
         <h4>Right Col</h4>
         <p>...</p>
         </div>
         </div>
    </div>
    </body>
    </html>
    -->
    I've used the following styles :
    <style type="text/css">
    /* <![CDATA[ */
         body {
              margin:0; padding:0;
              font-size:80%;
              font-family: sans-serif;
    #header {
    display: block;
    width: 80%;
    margin: auto;
         #container {
         width: 80%;
         margin: auto;
              padding:0;
              display: table;
              border: 1px solid black;
    #row {
    display: table-row;
         #left {
              width:150px;
              padding:1em;
              background: #EEF;
              display: table-cell;
         #right {
              width:150px;
              padding:1em;
              background:#FEE;
    display: table-cell;
         #middle {
              padding: 1em;
              background:yellow;
    display: table-cell;
    /* ]]> */
    </style>
    Hope it helps!
    Cheers,
    pedro
    Edited by: plopes on May 11, 2009 2:46 PM
    Edited by: plopes on May 11, 2009 4:40 PM

  • More Replace needed inside a single cell , more than 2-3

    in a single cell on there are values like
    6602,6602,6594,7970
    7970;6602;6602;
    6591,6591;,,7346,6591;,,7346
    now these values are inside a single cell
    now i want to remove the duplicates
    like in the first row the out put should be
    6602,6594,7970
    second row output should be
    7960,6602
    third row
    6591,7346
    please help
    :'(

    Is this question related to OLM or iLearning?
    If this question is for OLM or iLearning we also need more info to give an answer.
    Regards Anders Northeved

  • How to change content of DataGrid cell on mouse over

    I am trying to change content of a datagrid cell when the mouse is over it. Changing the dataProvider does not provide immediate feedback because update is performed by renderer. I am trying to directly update content of a cell onMouseOver and restore it onMouseOut.
    I am thinking of leaving the column empty and insert content onMouseOver, cleanup onMouseOut. Alternative, may be I can populate the column and mask out all but the cell the mouse is over.
    Any suggestion on how this may be done?
    Thanks!

    I would override updateDisplayList, call isItemHighlighted and set the content of the cell accordingly
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Moive clip in dataGrid cell.

    I want to put a movie clip into datagrid cell
    and cell data will change the color of the movie clip.
    how could I do that?
    pls help

    I think, you can use cellRenderer.
    If you want add icon something like that means, you can use
    "setPropertiesAt"

  • 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

  • Enlarging a Flex DataGrid cell on RollOver

    Hi, I have a DataGrid which has a column named Hyperlinks where I show useful hyperlinks for the user. Sincce typically Hyperlinks are too big to show in a DataGrid cell, I need to have the column width at max 100px to be able to fit other columns in the Grid.
    What I am looking for is a way to show content of the cell when the user mouse over the cell. May be when user rollover, the cell shows the content increasing its size overlapping on the adjucent cells.
    Can anyone pls give me some suggestion on this? a code snippet would be very helpful if possible...
    Thanks in advance, Bose.

    Hi
    Instead of enlarging a cell you can display data using showDataTips="true" for the respective column.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:mx="library://ns.adobe.com/flex/mx" layout="absolute" minWidth="955" minHeight="600" applicationComplete="initData()">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                private var DGArray:Array = [
                    {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
                    {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99}];
                [Bindable]
                public var initDG:ArrayCollection;
                public function initData():void {
                    initDG=new ArrayCollection(DGArray);
            ]]>
        </fx:Script>
        <mx:DataGrid id="myGrid" dataProvider="{initDG}" >
            <mx:columns>
                <mx:DataGridColumn dataField="Album" dataTipField="Album" showDataTips="true" />
                <mx:DataGridColumn dataField="Price" />
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>

  • 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.

  • 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

  • Draw gradient datagrid cells

    Hi
    How can I draw a gradient backround in a datagrid cell using
    a class that expends a DataGridItemRenderer Class ?
    Thanks,
    Aubry

    "bujj_xyz" <[email protected]> wrote in
    message
    news:g9qqms$goo$[email protected]..
    > hi,
    >
    > you told advanced datagrid but i can use only datagrid,
    for advanced
    > datagrid
    > there is background message...thats why
    >
    > if u don't mine can u give me any example i need very
    urgent.
    You can get rid of the message by upgrading to pro.

  • Enable / disable combo box in datagrid cell

    I have a datagrid with 8 columns 2 check boxes a text box and
    5 combo boxes. I am trying to disable the combo boxes if the first
    check box is not checked. So far I am able to disable the entire
    column with the combo box in it, but what i am trying to achieve is
    if the check box is false then the 5 combo boxes are to be
    disabled.
    So what I am asking in a nutshell is is there a way to enable
    or disable particular cells in a datagrid ?
    Example
    of what I have already done
    Any suggestions will be gratefully received.

    I put the following code in that I took from samples:
    Bindable]public var test:ArrayCollection;
    private  
    function init():void
    test =
    new ArrayCollection([{label:"High", data:"high"},{label:
    "Medium", data:"medium"},{label:
    "Low", data:"low"}]) 
    Then in the mxml:
    <mx:DataGridColumn 
    headerText="From Fiscal Period">
    <mx:itemRenderer>
    <mx:Component>
    <mx:ComboBox dataProvider="{test}">
    </mx:ComboBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    I still get the same error: 1120: Access of undefined property test.

Maybe you are looking for

  • How to open Image path URL link in OA Framework

    Hi Friends I Have the requirement please suggesh me ur idea 1)I have created a SearchPG with two LOV fields if I select a value from the LOV - example -orderno 1233455 It brings data in my table field for that particular ordernumber My table has colu

  • My display doesn't fit on my screen

    I can't see both sides of my screen display, thus I can't access the back button on the left and the scroll on the right at the same time.  How can a iadjust the setting to do so?

  • How do I start my itunes all over again??

    How do I clear my itunes to make a brand new account with no music on it??

  • Do i need to buy a new soundcard(Creative Inspsire T7900???

    i bought the Creative inspire t7900 and try to connect to my pc(integrated soundmax digital audio - three outputs-pink,green,blue.), but in all of ways i i've tried to connect it only front speakers(or only side s.,rear s.-depending on way of connect

  • I CANNOT CHANGE PASSWORD OR I.P. ADDRESS

    BEFW11S4 ROUTER  Please help! I reset my router so now the i.p. is 192.168.1.1 This i.p. does not work with my dsl modem. My default gateway is 192.168.1.254... is that what the router is supposed to be set at? Also.. i can't change my password... am