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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:52:00+00:00 2026-05-12T22:52:00+00:00

I am using a GroupingCollection to bind my advanceddatagrid. I have used groupingcollection to

  • 0

I am using a GroupingCollection to bind my advanceddatagrid. I have used groupingcollection to group the data by date.

Now I need to select the data in the datagrid through the code. Does anyone have any idea as to how to do this? I need to loop through the adg’s dataprovider and select the item that matches the criteria for the selection.

Please advise

Thanks 🙂

  • 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-12T22:52:00+00:00Added an answer on May 12, 2026 at 10:52 pm

    Okay, depending on how the question in interpreted, this code will find the items that match the grouping year that is selected. I added a click=findStuff(event) to the mx:AdvancedDataGrid, as shown here:

    [Bindable]  
    public var myData:ArrayCollection = new ArrayCollection([
        {name:'Denise', grad:'2000'},
        {name:'Steph', grad:'1990'},
        {name:'Jane', grad:'2000'},
        {name:'Nicole', grad:'2000'},
        {name:'Donna', grad:'1990'}]);
    
    public function findStuff(e:Event):void {
        var groupColl:GroupingCollection = adGrid.dataProvider.source;
        var items:Object = groupColl.source;
    
        var ac:ArrayCollection = new ArrayCollection();
        for (var i:int=0; i<items.length; i++) {
            if (items[i].grad == e.target.text) {
                ac.addItem(items[i].name);
            }
        }
        Alert.show("selected items: " + ac.toArray());
    }
    
    <mx:GroupingCollection id="coll" source="{myData}">
        <mx:Grouping>
            <mx:GroupingField name="grad" />
        </mx:Grouping>
    </mx:GroupingCollection>
    
    <mx:AdvancedDataGrid id="adGrid" dataProvider="{coll}"
                             click="findStuff(event)"
                             initialize="coll.refresh()">
        <mx:columns>
            <mx:AdvancedDataGridColumn headerText="name" dataField="name"/>
        </mx:columns>
    </mx:AdvancedDataGrid>
    

    Note that first I get the GroupingCollection from the AdvancedDataGrid dataProvider, then I get the items from the GroupingCollection. These could be combined into one step, but this way is more readable for the example. Not knowing exactly what data you’re looking for I just grab the name field from the data item but there’s no reason you couldn’t grab the whole item.

    Hopefully this is a step in the right direction for you.

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

Sidebar

Related Questions

Using Core Data. Let's say we have models for Team and Player. Assume: -Each
I have am using an mx:advanceddatagrid and I running into a problem with grouped
Using VB6 & Crystal Report 9. Need help with the VB6 code. When i
using VB.Net2010 I need to call a C# DLL The problem I have is
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Using C#, I need a class called User that has a username, password, active
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
Using jQuery's UI Tabs. This is my code. <div id=tabs> <ul> <li><a href=#tabs-1>Find a

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.