Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7984233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:12:12+00:00 2026-06-04T11:12:12+00:00

I create a datagrid with inline itemrenderer. The renderer is a dropdownlist. When dropdowlist

  • 0

I create a datagrid with inline itemrenderer.
The renderer is a dropdownlist.
When dropdowlist value change, I’d like to update dataprovider but I didn’t found how to do that.
Can you help me?

Thanks

[Bindable] private var DP_PRAT_INIT:ArrayCollection;

<s:DataGrid id="dgTuVous" fontWeight="normal" 
                                        dataProvider="{DP_PRAT_INIT}"
                                        width="100%" height="100%" 
                                        horizontalScrollPolicy="on"
                                        fontSize="10"

                                        >
                                <s:columns>
                                    <s:ArrayList>
                                        <s:GridColumn dataField="prInitiales" width="40" headerText="Prat" />
                                        <s:GridColumn  width="75" dataField="prTuVous"
                                                      headerText="Tu/Vous" editable="true">
                                            <s:itemRenderer>
                                                <fx:Component>
                                                    <s:GridItemRenderer>
                                                        <fx:Script>
                                                            <![CDATA[
                                                                import spark.events.IndexChangeEvent;



                                                                protected function ddlTuVous_changeHandler(event:IndexChangeEvent):void
                                                                {

                                                                    DP_PRAT_INIT[ddlTuVous.selectedIndex].prTuVous=ddlTuVous.selectedItem;

                                                                    trace ("ddlTuVous.selectedItem" +ddlTuVous.selectedItem) ;

                                                                }

                                                            ]]>
                                                        </fx:Script>
                                                        <s:DropDownList width="100%" selectedIndex="1" id="ddlTuVous"
                                                                        change="ddlTuVous_changeHandler(event)">
                                                            <s:dataProvider>
                                                                <s:ArrayList>
                                                                    <fx:String>Tu</fx:String>
                                                                    <fx:String>Vous</fx:String>
                                                                </s:ArrayList>
                                                            </s:dataProvider>
                                                        </s:DropDownList>
                                                    </s:GridItemRenderer>
                                                </fx:Component>
                                            </s:itemRenderer>



                                        </s:GridColumn>

                                    </s:ArrayList>
                                </s:columns>
                            </s:DataGrid>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:12:14+00:00Added an answer on June 4, 2026 at 11:12 am

    You reference the host control with the outerDocument property… so you would call outerDocument.DP_PRAT_INIT if you want to access that array. BUT, that array is private, so you have to make it public. Or, you can make a public function that you can call on outerDocument but … yuck.

    If I am understanding your code properly, you should access the data property of the GridItemRenderer which is the same as outerDocument.DP_PRAT_INIT[ddlTuVous.selectedIndex] except that it is better because you don’t have possible index mismatches…

    So, what you really want is:

    data.prTuVous = ddlTuVous.selectedItem;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I create DataGrid Columns with Binding (where i is a Int value): dataGrid.Columns.Add(new DataGridTextColumn
When I create something like the following: <mx:DataGrid idmyDataGrid itemEditBegin=myDataGrid_itemEditBeginHandler(event) /> When does the
I create the checkbox column in datagrid. and it works fine. But i need
Inside a datagrid, I essentially want to create a download button itemrenderer to the
I was wondering something: if you create a template under a control (like datagrid),
This walkthrough says you can create a WPF datagrid in one line but doesn't
I am trying to create a spark datagrid item renderer. This item renderer extends
I'm trying to create datagrid tooltip entirely in code behind file. Tooltip XAML code
I'm trying to create a DataGrid dynamically. Declarative creation is working fine: A source
I have the following scenario, I want to create a DataGrid and then populate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.