shahnaeem opened a new issue #1184:
URL: https://github.com/apache/royale-asjs/issues/1184


   `<?xml version="1.0" encoding="utf-8"?>
   <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
                                xmlns:js="library://ns.apache.org/royale/basic"
                                xmlns:mx="library://ns.apache.org/royale/mx"
                                xmlns:s="library://ns.apache.org/royale/spark"
                                xmlns:local="*"
                                pageTitle="HelloWorld">
                           
        <fx:Declarations>
        </fx:Declarations>
        
        <fx:Script>
                <![CDATA[
                        import org.apache.royale.events.Event;
                        import mx.collections.ArrayCollection;
                        import mx.utils.ObjectUtil;
                                [Bindable] public var arcCompData:Array =  new 
ArrayCollection(["adata1", "bdata1","cdata1"]);
                
                        private function fn_FormatGrid(item:Object, 
column:AdvancedDataGridColumn):String {
                                return "ok";
                                
                                
                                
                        }
                        private function displayLabelCompare(obj1:Object, 
obj2:Object):int{
                                return 
ObjectUtil.stringCompare(obj1.@displayLabel, obj2.@displayLabel);
                        }
                ]]>
        </fx:Script>
        
        <js:valuesImpl>
                <js:SimpleCSSValuesImpl />
        </js:valuesImpl>
        
        <js:initialView>
                <js:View width="100%" height="100%">
                        <js:Container width="100%" height="100%" >
                                <s:BorderContainer  x="3" y="28" height="100%" 
width="100%">
                        <mx:AdvancedDataGrid id="dgCompData" 
sortExpertMode="true" styleName="advancedDataGrid" 
                                                                                
 rowHeight="20" verticalAlign="middle" 
                                                                                
 dataProvider="{arcCompData}" tabEnabled="false" 
                                                                                
 tabFocusEnabled="false" left="2" right="2" bottom="30" top="30">
                                                                                
 
                                                <mx:columns>
                                                        
<mx:AdvancedDataGridColumn headerText="Code" width=".40"  labelFunction 
="fn_FormatGrid"
                                                                                
                           resizable="true"
                                                                           
sortCompareFunction="displayLabelCompare"
                                                                           
dataField="@displayLabel"
                                                                           
showDataTips="true"
                                                                           
dataTipField="@displayLabel"
                                                                                
                           />
                                                        
                                                        
                                                </mx:columns>
                                        </mx:AdvancedDataGrid> 
                                        </mx:AdvancedDataGrid> 
                                                        
                </s:BorderContainer>
                        </js:Container> 
                </js:View>
        </js:initialView>
        
    </js:Application>`
    
    if you look at this example , here 
sortCompareFunction="displayLabelCompare"  displayLabelCompare() method is not 
getting called due to which column data doesn't get sorted.
    Any idea , how to fix this bug?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to