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

Similar Messages

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

  • 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

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

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

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

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

  • Need help adding image to datagrid column

    Hi,
    Can anyone tell me how to add an image to a datagrid column?
    I have created a flex library project which contains a mxml component with a datagrid, an item renderer mxml component which rendered the image within the datagrid column depending on the value coming back from the database for that column and a folder 'assets' which hold all the images. When I add the library to my main project and call the mxml component with the datagrid an image place holder is visible in the datagrid column but not the image. However, if I take the image out of the library project and added to an 'assets' folder in the main project the image is displayed in the datagrid column.
    It looks like, even though the images are in the flex library project and only the flex library project is trying to display the images in the datagrid, the library project is looking in the main application project folder for the image.
    Does anyone know why this is happening and how to fix it?
    Thanks in advance for an help,
    Xander.

    I have tried embedding the images in my library but it still didn't work. Also I can't embed the image as I'm using the value of the column to complete the image name, for example in my mxml item renderer component I have the added the following code
    <mx:Image source="@Embed(source='assets/' + data.mycolumnvalue + '.png')" tooltip="{data.mycolumnvalue}"/>
    but nothing is displayed.

  • How do you programmatically change an image in DataGrid cell

    I have a DataGrid which contains a status icon. I have been able to get the initial status icon to show in the DataGrid. But I am unable to update the it. I basically need to update the image for a selected row with either a 'assets/processing.png',  'assets/success.png' or 'assets/failure.png' image. I just cannot seem to be able to figure out how to get access to the image in the necessary cell to update/replace it. I've tried to make it a property of my ArrayCollection data provider, but that does not work. I've also have tried to some how get a reference to the original image so it can be replaced, but cannot figure out how to do such. Below is the code to my DataGrid. I will be very appreciative of any help on this. (I'm relatively new to Flex/ActionScript, but a seasoned developer otherwise.)
    <mx:DataGrid id="myDataGrid" left="0" top="0" bottom="0" right="0"
                         allowMultipleSelection="true" verticalScrollPolicy="on"
                         draggableColumns="false" resizableColumns="false" sortableColumns="false"
                         dataProvider="{myArrayCollection}">
                <mx:columns>
                    <mx:DataGridColumn headerText="Name" dataField="name" wordWrap="true" />
                    <mx:DataGridColumn headerText="Status" dataField="status" width="75" textAlign="center">
                        <mx:itemRenderer>
                            <mx:Component id="statusComponent">
                                <mx:HBox id="imageBox" width="100%" height="100%" horizontalAlign="center">
                                    <mx:Image id="statusImage" source="@Embed('assets/pending.png')" width="16" height="16"  />
                                </mx:HBox>
                            </mx:Component>
                        </mx:itemRenderer>
                    </mx:DataGridColumn>
                </mx:columns>
            </mx:DataGrid>

    Mark,
    My sincerest thanks for your assistance. myDataGrid.invalidateList() the key thing I was missing in all my previous attempts. I had thought about  needing to do something to refresh the grid, but was looking for a "refresh" method. I did not see the invalidateList() method.
    To get it to work I needed to override the Container's set data method within the status image column (see below for my full example). Without this, it does not work. Am I missing something or is there a better way to do this?
    Again, thank you very much for your help.
    <?xml version="1.0" ?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
      <mx:Canvas width="100%" height="100%">
        <mx:DataGrid id="myDataGrid" left="0" top="0" bottom="0" right="0"
                     allowMultipleSelection="true" verticalScrollPolicy="on"
                     draggableColumns="false" resizableColumns="false" sortableColumns="false"
                     dataProvider="{myArrayCollection}">
          <mx:columns>
            <mx:DataGridColumn headerText="Name" dataField="name" wordWrap="true" />
            <mx:DataGridColumn headerText="Status" dataField="status" width="75" textAlign="center">
              <mx:itemRenderer>
                <mx:Component>
                  <mx:HBox width="100%" height="100%" horizontalAlign="center">
                    <mx:Image id="statusImage" width="16" height="16" />
                    <mx:Script>
                      <![CDATA[
                      override public function set data(value:Object):void
                        if (value != null)
                          statusImage.source = value.status;
                      ]]>
                    </mx:Script>
                  </mx:HBox>
                </mx:Component>
              </mx:itemRenderer>
            </mx:DataGridColumn>
          </mx:columns>
        </mx:DataGrid>
      </mx:Canvas>
      <mx:Button id="updateButton" click="updateIcon()" label="Update Icon" />
      <mx:Script>
      <![CDATA[
        import mx.collections.ArrayCollection;
        [Embed(source="assets/success.png")]
        public static const successImage:Class;
        [Embed(source="assets/fail.png")]
        public static const failImage:Class;
        [Embed(source="assets/pending.png")]
        public static const pendingImage:Class;
        [Bindable]
        private var myArrayCollection:ArrayCollection = new ArrayCollection();
        private var lastIndex:Number = 0;
        private function updateIcon():void
          //sample updating
          var item:Object = myArrayCollection.getItemAt(lastIndex);
          (lastIndex % 2 == 0) ? item.status = EmbeddedImages.successImage : item.status = EmbeddedImages.fail1Image;
          myDataGrid.invalidateList();
          if (++lastIndex > myArrayCollection.length - 1)
            lastIndex = 0;
        private function init():void
          //load some dummy sample data for demo/testing
          for (var i:Number = 1; i <= 10; i++)
            myArrayCollection.addItem({
              name:"value-" + i,
              status:pendingImage
        ]]>
        </mx:Script>
    </mx:Panel>

  • Double click on Datagrid cell

    Hi,
    I'm developing an application where I'm using a datagrid that shows some information from an xml. Every cell in the grid is of the form
    <itemRenderer>
    <compoment>
    <Vbox>
    <HBox>
    <Text/> //some text goes within this block
    <Text/> //some text goes within this block
    <Text/> //some text goes within this block
    </Hbox>
    </VBox>
    </component>
    </itemRenderer>
    I have set a function call for the datagrid on ItemDoubleClick event; and this even gets triggered only when i double click on any TEXT that is on the cell; and NOT on any part of the cell. However, I would like to have this triggered when the user clicks anywhere in the cell.
    Sombody please help,
    Thanks!!

    Hi,
    Thanks for the suggestion. Maybe I wasn't clear in explaining the issue here. Let me throw some light now, My code is somewhat like this
    <mx:VBox opaqueBackground="{myxml.@data>10 ?  '0xA2FEA2' : '0xFEA2A2' }" width="100%" height="100%" verticalScrollPolicy="off">
         <mx:Box width="100%" height="100%">
              <mx:Text id="txt1" text="Available" width="100%"/>
               <mx:Text id="txt2" text="{myxml.@data}"/>
         </mx:Box>
    </mx:VBox>
    The output is shown in the attachment. Now whenever I double click on the text in the datagrid(highlighted in blue in the attachment) my doubleclick even is fired; but if i click anywhere in the cell(green region in the attachment) my doubleclick event is not called.
    Hope this helps! Looking forward for your assistance,
    Thanks again!!
    Cheers

  • Adding formula to a cell that is in another table in the same document

    Hi there.
    I am new to iwork and i have a question.
    I created a document in pages and i added diffent tables in the same document.
    The question is how can add a formula to a cell include cells that are on different tables?
    Thanks

    Not possible in Pages, only in Numbers.
    You will need to have just one table and have the references internal.
    You can make it look like separate tables by hiding cell borders etc inbetween, if that is necessary.
    Peter

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

  • Fetching column data for clicked DataGrid cell

    I am using a DataGrid and the number of columns are based on the data thus dynamic; columns are added at runtime.  I am trying to use the same ItemRenderer for all columns.  The one piece I can not seem to get to work is knowing which datafield to use to populate each column.  I have tried getting the column.dataField from the current datacolumn to no avail; sample code listed below.  This is my first Flex project so my approach to the problem may not be the best; please alert me if this is the case.  I would appreciate any help you could lend.
                    var dgListData:DataGridListData = listData as DataGridListData;
                    var dataGrid:DataGrid = dgListData.owner as DataGrid;
                    var column:DataGridColumn = dataGrid.columns[dgListData.columnIndex];
                    var dataField = column.dataField;
                    var lbl:Label = new Label();
                    lbl.text = value[dataField];    // must add based on previously named source field; dataField
    ce

    Update:
         A few more details...
    I am trying to do this inside of override public function set data(value:Object):void {}

  • How make datagrid cell clicking not to affect the row selected?

    Hi all,
    I made SelectionUnit as FullRow. The first column, second column, and so on, which can work well for selecting row when I clicking the cells of them.
    But I want the last column to remove the affection that the whole row is selected when I click last column cell.
    how to do it? thanks.
    <DataGrid ItemsSource="{Binding itemSource}" AutoGenerateColumns="False" RowHeight="25" SelectionUnit="FullRow"

    You could set the AutogenerateColumns property to false, define all columns in the XAML markup explicitly and then specify a CellTemplate for the last column and handle its MouseLeftButtonDown event to change the SelectionUnit property of the DataGrid. Here
    is an example for you:
    <DataGrid x:Name="dg" AutoGenerateColumns="False" RowHeight="25" SelectionUnit="FullRow">
    <DataGrid.Resources>
    <Style TargetType="DataGridCell">
    <EventSetter Event="PreviewMouseLeftButtonDown" Handler="cell_MouseLeftButtonDown"/>
    </Style>
    </DataGrid.Resources>
    <DataGrid.Columns>
    <DataGridTextColumn Binding="{Binding A}"/>
    <DataGridTextColumn Binding="{Binding B}"/>
    <DataGridTextColumn Binding="{Binding C}">
    <DataGridTextColumn.CellStyle>
    <Style TargetType="DataGridCell">
    <EventSetter Event="PreviewMouseLeftButtonDown" Handler="cell_MouseLeftButtonDownLast"/>
    </Style>
    </DataGridTextColumn.CellStyle>
    </DataGridTextColumn>
    </DataGrid.Columns>
    </DataGrid>
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    List<MyItem> items = new List<MyItem>();
    items.Add(new MyItem() { A = "1", B = "1", C = "1" });
    items.Add(new MyItem() { A = "2", B = "2", C = "2" });
    dg.ItemsSource = items;
    void cell_MouseLeftButtonDownLast(object sender, MouseButtonEventArgs e)
    dg.SelectionUnit = DataGridSelectionUnit.Cell;
    void cell_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    dg.SelectionUnit = DataGridSelectionUnit.FullRow;
    Please remember to mark all helpful posts as answer to close the thread and then please start a new thread if you have a new question.

Maybe you are looking for

  • Adding new field in Objects(Equipment) either using AET or EEWB.

    I have to add a new field in the screen for Objects (under Processing data). To do the same first i tried using AET but i get the "Show Enhancements" and "Create New Fields" buttons grayed out in AET so i assume that AET is not available for Objects(

  • When I imessage it uses my email instead of my name

    When I text other people with an iphone imessage uses my email instead of my name. How do I fix that? One of my friends thought I was spam because of this.

  • Business Place - Tax Code Combination

    Hi, I need to get tax code automatically when i enter the Business Place in FB70 transaction code. Is it possible thru Substitution? If not possible can i get it done thru validation atleast to prevent wrong tax code for business place combination? P

  • Subscriptions and Skype credit

    Hi Skype I am pondering on whether to buy a one year unlimited world subscription however I also have skype pay as you go credit right now how will it work ? How does it work and what will get deducted , is it possible to transfer my balance to subsc

  • DROID X DOES NOT RETRIEVE EMAIL UNLESS POWERED OFF, THEN ON

    I've identified through testing and confirmed that my 3 day old Droid X does NOT actually retrieve email from a third party (non Google) mail server WITHOUT having to power it down, then back up first.  Activating the cute little manual retrieving sp