Link to home
Start Free TrialLog in
Avatar of jeresimpson
jeresimpson

asked on

AdvancedDataGrid, Grouping/Sorting problem

I have a Flex 3 AdvancedDataGrid component where I using the GroupingCollection and that is putting it into the tree struction by group just like I would like.  But ordering them incorrectly.
The query pulls the data and orders it correctly, but it seems to randomly order it into my grid.
Any help would be greatly appreciated!
<mx:AdvancedDataGrid creationComplete="this.TrainingDM.runTrainingWizard(LoginGrid.selectedItem.UserID);"  id="RecommendedGrid2"  verticalScrollBarStyleName="ScrollBarPaper" wordWrap="true"   width="100%" height="100%" headerColors="[#ffffff, #808080]" textAlign="left" fontSize="12"  allowDragSelection="false" dragMoveEnabled="false" dragEnabled="false" dropEnabled="false" backgroundSize="100%" alpha="1.0"   backgroundImage="../Assets/napkin.jpg" backgroundAlpha=".7" cornerRadius="0" dropShadowEnabled="true" shadowDirection="right" shadowDistance="5" horizontalGridLines="true" verticalGridLines="true" verticalGridLineColor="#FF0000" horizontalGridLineColor="#D9D9FF" themeColor="#c4c400" useHandCursor="true"  buttonMode="true"  variableRowHeight="true" useRollOver="true" mouseChildren="true" selectable="true" mouseEnabled="true" headerHeight="28" fontWeight="bold" styleName="mydataGridHeaderStyle"  sortExpertMode="true" sortableColumns="true" >
	  <mx:dataProvider>
		 <mx:GroupingCollection id="gc" source="{TrainingDM.runTrainingWizard.lastResult}">
			<mx:Grouping>
				<mx:GroupingField name="ParentName"  />
				
			</mx:Grouping>
		 </mx:GroupingCollection>
	  </mx:dataProvider> 
				<mx:columns>
			<mx:AdvancedDataGridColumn    sortable="true"  headerText="CLASS NAME (RECOMMENDED):" dataField="TrainingName"   >
			</mx:AdvancedDataGridColumn>
 
 
				</mx:columns>
			</mx:AdvancedDataGrid>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of jeresimpson
jeresimpson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial