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 6930545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:27:40+00:00 2026-05-27T11:27:40+00:00

In my flex application im using a datagrid which has checkbox itemrenderer column im

  • 0

In my flex application im using a datagrid which has
checkbox itemrenderer column
im using the following code

<mx:DataGridColumn headerText="Select"  dataField="isSelect" editable="false" textAlign="center"   >
                        <mx:itemRenderer >
                            <mx:Component>

                                <mx:CheckBox  selected="{data.isSelect}" change="outerDocument.addDetail(data)"  > 
                                </mx:CheckBox>
                            </mx:Component>
                        </mx:itemRenderer>
                    </mx:DataGridColumn>

                    <mx:DataGridColumn headerText="FirstName" dataField="firstName" color="black" editable="false" width="125" />
                    <mx:DataGridColumn headerText="SecondName" dataField="lsecondName" color="black" editable="false" width="125"/>

after selecting the checkbox and im saving the details in my DB.
now,
when i come for fetching data the selected details from the db should be selected in checkbox.
how can i differentiate selected record and unselected Record.?? thanxx in advance

  • 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-05-27T11:27:41+00:00Added an answer on May 27, 2026 at 11:27 am
    <mx:itemRenderer>
                            <mx:Component>
                                <mx:HBox horizontalAlign="center" verticalAlign="middle">
                                    <mx:Script>
                                        <![CDATA[
                                            var objTemp:Object = new Object();
    
                                            override public function set data(value:Object):void
                                            {
                                                if(value != null)
                                                {
                                                    var xml:XML = XML(value);
                                                    super.data = value;
                                                    objTemp = outerDocument.xmlToObject(xml.toString());
                                                    if(objTemp.story['quiz_score'] != null)
                                                    {
                                                        chkAssignment.visible = false;
                                                    }
                                                    else
                                                    {
                                                        chkAssignment.visible = true;
                                                    }
                                                    if(objTemp.story.is_selected == false)
                                                    {
                                                        chkAssignment.selected = false;
                                                    }
                                                    else
                                                    {
                                                        chkAssignment.selected = true;
                                                    }
    
                                                }
                                            }
    
                                            private function deleteAssignment():void
                                            {
    
    
                                                if(chkAssignment.selected)
                                                {
                                                    outerDocument.isChanged = true;
    
                                                    objTemp.story.is_selected = true;
                                                    var xml:XML = outerDocument.objectToXML(objTemp,"record");
    
                                                    var xmlList:XMLList = xml.children();
                                                    xml = xmlList[0] as XML;
    
                                                    outerDocument.dgListeningLog.dataProvider[outerDocument.dgListeningLog.selectedIndex] = xml;
    
                                                    outerDocument.arrAssignment.push({"story_name": XML(outerDocument.dgListeningLog.selectedItem).story_title.toString() ,"student_assignmentId": XML(outerDocument.dgListeningLog.selectedItem).assignment_id.toString(),"session_key": XML(outerDocument.dgListeningLog.selectedItem).session_key.toString(),"selectedIndex": outerDocument.dgListeningLog.selectedIndex.toString()});
                                                }
                                                else
                                                {
                                                    outerDocument.isChanged = true;
    
                                                    objTemp.story.is_selected = false;
                                                    var xml:XML = outerDocument.objectToXML(objTemp,"record");
    
                                                    var xmlList:XMLList = xml.children();
                                                    xml = xmlList[0] as XML;
    
                                                    outerDocument.dgListeningLog.dataProvider[outerDocument.dgListeningLog.selectedIndex] = xml;
    
                                                    for(var i:int =0; i < outerDocument.arrAssignment.length; i++)
                                                    {
                                                        if(outerDocument.arrAssignment[i].selectedIndex == outerDocument.dgListeningLog.selectedIndex)
                                                        {
                                                            outerDocument.arrAssignment.splice(i,1);
                                                            break;
                                                        }
                                                    }
                                                } 
    
                                            }
    
                                        ]]>
                                    </mx:Script>
                                    <mx:CheckBox id="chkAssignment" change="{deleteAssignment();}"/>
                                </mx:HBox>
                            </mx:Component>
                        </mx:itemRenderer>
    

    here i am storing the selected value or array in another array and when clicking on the remove button it will check and delete the value from the main array that is data provider of the dataGrid.

    If you are facing the problem when scrolling the datagrid CheckBox shows wrong value than copy following method from code:

    override public function set data(value:Object):void

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using http://code.google.com/p/flex-iframe/ for showing html in an flex application. To set this up
I have flex application consisting of several modules which is configured using maven. I'm
In my flex 3 application I have 5 fields with textboxes. I'm using datagrid
I'm building a flex application using the http://code.google.com/p/facebook-actionscript-api/ library. Is it possible to get
In my flex application im using two datagrid first datgrid is for items collections
I am building a Flex application which communicates with a Java server using BlazeDS.
I want to play Audio in flex application.I am using SWFLoader for it.Is there
My Flex application records audio-only FLV files using red5--I'd like to convert these to
I have a Flex application where I'm using a Canvas to contain several other
I have created an application using Adobe Flex. I took all the files from

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.