Issue with Number sort in flex datagrid

Hi All,
I have implemented Number sorting as mentioned in the below(code).
I have placed the function that i am setting for the column that is to be sorted.
This column contains formatted amount (e.g. $2,000.00), so flex considers it as String and sorts the data as String.
In the function pasted below i am removing the formatting and then converting the unformatted string into a Number.
This function works fine when the amount of data is not large. i.e. < 1000 records in datagrid.
But when the records are > 1000, the sorting takes long time and most of the time the script takes more than 30 secs to run.
The reason here is that when the amount of data is large then the comparisons increase and the method which i am calling in this method gets called twice as many times as the numericSort Function.
This causes the delay and the error is thrown.
IS THERE ANY OTHER WAY TO IMPLEMENT NUMERIC SORTING WHICH IS LESS TIME CONSUMING THAN THIS WAY?
Please help as i need a solution to this urgently.
Thanks.
Here is the method
Code :::
public static function numericSort(obj1 : Object, obj2 : Object):int
        try
                var d1 : Number;
                var d2 : Number;
                var index : int = Util.getColumnIndex("MARGIN");
                d1 = Number(removeStringFormatting(obj1[index]));
                d2 = Number(removeStringFormatting(obj2[index]));
                if (d1 < d2) {
                      return -1;
                } else if (d1 > d2) {
                     return 1;
                } else {
                return 0;
        catch(error : Error)
                Alert.show("Error in numericSort "+error.getStackTrace());

Off topic: Having 1000 results displayed at once in a DataGrid ( heck, even 100-200 at once ) is dumb. Instead, you should break your data down to smaller pieces and use paging or something to traverse the whole collection of data. Displaying an imense bunch at once is just plain dumb.
Regarding your problem: Since the data displayed in the DataGrid is formatted, you won't be having an easy time trying to sort that formated data. Instead, you should convert the data back to Number or integer ( or whatever might suit your needs ) and sort it that way. A custom compare function is good because you can perform the conversion back to the original state there and then sort the values ( or you can store a temporal list of the data that is unformatted, sort it, format it and display it - this is just one possible solution of the quite many ).

Similar Messages

  • CSV to Excel 2013 - Issue with number format

    Hi,
    I use Excel 2013 to manipulate CSV files. I experienced issue with number format cells. In my CSV file there is one column that presents latitude values in format: 52.05456464. When I open my CSV file in Excel 2013 all values in that column get separator
    ".", in this case my number is present like this: 52.054.454.464. I tried to change my cell format, and when opened the category was Number, I change it to the General but in that case I lost all "." and got 52054454464.
    I also tried to open same file on other machine with Excel 2010 and file is opened correctly without issues and in cell format the category is general by default.
    I hope that there is some kind of resolution for this.

    Hi
    According to your description, we may follow these steps:
    highlight the column B > Home Tab > Number section > Select Number and choose "More Number Format" > Make sure the Negative number is chosen correctly. If you are using Custom format, we will have to change it.
    Hope it helps
    Best regards

  • Issue with number of replies in collaboration Server

    Hello,
    We are using the collaboration server 4.02.
    We are experiencing issues with the collab API or directly with the native explorer.
    If we create a project, then a discussion, then a message in this discussion and then more than 15 replies a forumthreadlimit exception occurs.
    Why there's a limitation of 15? Can we increase this number in a specific config file?
    Thanks a lot for your help.
    Best regards.
    Sébastien D.

    What where the precise Kernel updates? What where you on and what did you upgrade too?
    Did you apply any BASIS Support Pack corrections during the Kernel upgrade?
    If you applied a new BASIS support pack - check the following WIKI:
    [How to check the publishing Date of an Internet Service|http://wiki.sdn.sap.com/wiki/x/OYG8BQ ]
    if you need to republish - use the following WIKI:
    [How to activate, publish and test ITS services in the integrated ITS?|http://wiki.sdn.sap.com/wiki/x/kmE ]
    Regards,
    Oisin

  • Issues with file upload in flex mobile application (sharepoint as backend)

    Hello,
    I am working on flex mobile application for android platform for which we are having sharepoint as a backend.
    (Flex SDK 4.6 and AIR 3.9)
    Issue which we are facing is as follows:
    We are communicating with the backend server using webservices: example:
    <s:WebService id="kWebService" wsdl="http://www.kservice.net/kdatabaseservice.asmx?WSDL" >
                <s:operation name="AddPost"
                             resultFormat="object"
                             result="addPostResult(event)"
                             fault="postsfaulterr(event)" />
    </s:WebService>
    Above services are working fine but we are facing issue with one service which is related to file upload.
    File upload for <10 MB is working fine but when we try to upload larger file on server it fails to process.
    We are sending bytearray to the backend and backend code is writing those bytearray into file.
    We have tried many ways to overcome from this situation. like we have checked configuration for file upload size on server , we have tried wcf services as well. Please help us on this criticle point as soon as possible
    Thanks
    Dhwani

    Prashant8809 wrote:
    Hi
    >
    > I have already gone through the video by Thomas Jung for multiple file upload but it saves the contents in server and not in >transparent table. So please suggest me alternative solutions.
    >
    >
    > Regards
    > Prashant Chauhan
    What do you mean that my video saves the contents int he server and not in transparent table?  I save the data into a temporary database table so it can be accessed by the parent WDA session. From there the WDA session can do whatever it wants with it.  What do you mean by transparent table - that would be a database table. Do you actually mean internal table?  if so, just read the data from the temporary database table into memory.

  • Issue with number/contact details showing on new iPhone

    Hi I'm having an issue with numbers. Myself & my mum both have iPhones. My Mum had previous phone (not iPhone), she purchased an iPhone & ported her old number across. before she ported we were texting each other on the new iPhone number. Now she has ported her old number to iphone, when she texts me it still shows the number she got with iphone, not her contact name or original ported number which I have saved, however if she calls me it does show her contact name & not the number. When I text or call her contact in my phone she does get it, however message sends as txt message not iMessage (iMessage is active on both phones) hope this all makes sense. can anyone help at all?
    Many thanks

    Swipe down from the middle of the screen to open Spotlight Search then type Contacts. If it is in a folder the folder name will be to the right of the Contacts listing in search.
    By default it is in the Extras folder on the second page.

  • Issue with child items of flex tree using QTP

    Hi,
    We are trying to automate Flex web application using QTP10.
    We are facing below issue with Flex tree when we try to automate a scenario of selecting a child item displayed in flex tree.
    Issue:
    On recording the step of selecting an item from Flex tree using QTP, the script displayed is .Select Index1. But when we replay it back no action is being performed.
    Also on object spy we are able to navigate only till flex tree and we are not able to spy child items of flex tree.On the web page the child items are displayed as radio buttons/checkboxes.
    Please provide a solution for me to this problem.
    Thanks

    Hi,
    You could perform a HTTP trace (using HTTP watch) and compare the OCI data in POST method for both users (the correct and incorrect ones).
    Perhaps there is some additional/missing information being passed from catalog to SRM.
    Kind regards,
    Ricardo

  • Issue with number of lines in Table control for an web transaction in ITS

    Hi,
    We have acustom web transaction ZC03 where we have used table controls. Recently a kernal patch has been installed and after that the number of lines appearing in table control has got changed. Earlier table control was coming with 5 lines and presently its coming with 3 lines. Can you please help me to fix the issue.
    The  code used in HTML template for table controi is given below:
    `SAP_DynproLayerBegin(005,013,067,006)`
      `SAP_TableControl("TC_TIME1")`
        `SAP_DynproLayerEnd()`
    I have tried other alternatives like  `SAP_DynproTableControl("TC_TIME1")`, `D_TableControl("TC_TIME1') but did n't get any fruitful result also.
    Thanks and Regards,
    Ranadev

    What where the precise Kernel updates? What where you on and what did you upgrade too?
    Did you apply any BASIS Support Pack corrections during the Kernel upgrade?
    If you applied a new BASIS support pack - check the following WIKI:
    [How to check the publishing Date of an Internet Service|http://wiki.sdn.sap.com/wiki/x/OYG8BQ ]
    if you need to republish - use the following WIKI:
    [How to activate, publish and test ITS services in the integrated ITS?|http://wiki.sdn.sap.com/wiki/x/kmE ]
    Regards,
    Oisin

  • Issue with Supplier site descriptive flex field upgrade from 11i to R12

    We ran into some issue when upgrade Supplier site descriptive flex field from 11i to R12.
    In 11i. we defined descriptive field on JG_PO_VENDOR_SITES. in the segment definition, we defined one of the attributes default value based on Form Field Value, and the statement is like this:
    SELECT decode(:SITE.COUNTRY,'IT','AP ITALIAN TRANSACTIONS','AP AUTOFATTURA') FROM dual
    All above worked fine in 11i, whenever the flexfield field is open in forms, the default valuse shows based on the real-time value in :SITE.COUNTRY.
    In R12, Supplier site management is in HTML format. There is no forms, which means no form value. Do you have an alternative soluction for implement the same logic in R12?
    Thank you and regards,
    Kate
    Edited by: user12100435 on Feb 12, 2013 9:06 AM

    Kate,
    Have you logged a SR and see if Oracle support can help?
    Thanks,
    Hussein

  • Group by Perfromance issue with Number and Varchar2

    Hi All,
    I got a question on performance on GROUP BY clause.
    Group by (Number) and Group by (Varchar2) --> In these 2 versions of Group by will oracle takes into consideration for the data types in the GROUP BY Clause as a performance issue.
    I.E. Select sum(sal) from emp group by deptno and Select sum(sal) from emp group by job.
    In the first group by we have number and second we got varchar2. So oracle will take the data types also into consideration for performance in the Group by clause.
    (Pls dont consider the amount of data in the tables ).
    Appreciate your response,
    Thanks,
    Madhu K.

    You are asking which way is more efficient?
    if someone ask to do a group by using a varchar column. oracle has no other way to do it but by the columns that the developer asks for...
    Amiel

  • Adobe Flex integration - Issue with populating table in Flex

    I'm trying to populate a table EXORGDS. In SAP I have defined the same DATASOURCE as EXORGDS. Here is the code I have defined in Flex.
    <mx:DataGrid id="OrgGr" borderStyle="outset"  backgroundAlpha="2" width="285" rowCount="3" backgroundColor="#ffffff" dataProvider="">
                <mx:columns>
                    <mx:DataGridColumn dataField="PORGUNIT" headerText="Org Unit"/>
                    <mx:DataGridColumn dataField="PORGDESC" headerText="Description"/>
                </mx:columns>
      </mx:DataGrid>
    Am I missing something here.
    Regards,
    Imthiaz

    Hi Srilatha,
    I am struck in the same problem. I am using the grouping collection option in Flex but my data is not getting displayed in the Flash Island, I have attached the code sample. Kindly guide me.
    <mx:AdvancedDataGrid id="myADG"
            width="100%" height="100%"
             initialize="gc.refresh();"  >       
            <mx:dataProvider>
                <mx:GroupingCollection id="gc" source="{datasource}">
                    <mx:grouping>
                        <mx:Grouping>
                            <mx:GroupingField name="{dis}"/>
                            <mx:GroupingField name="{ter}"/>
                        </mx:Grouping>
                    </mx:grouping>
                </mx:GroupingCollection>
            </mx:dataProvider>       
            <mx:columns>
                <mx:AdvancedDataGridColumn dataField="{dis}"
                 headerText="Employee Name"/>
                <mx:AdvancedDataGridColumn dataField="{ter}"
                    headerText="Age"/>
                <mx:AdvancedDataGridColumn dataField="{act}"
                  headerText="Department" />
                <mx:AdvancedDataGridColumn dataField="{est}"
                  headerText="Job Title"/>
            </mx:columns>
        </mx:AdvancedDataGrid>  
    Thanks
    Vivek

  • Multiple issues with new installation

    I have several issues with my fresh installation of arch (just got myself a free old-as laptop , thus trying out arch for the first time as I usually run gentoo), and I'm not sure where these should go. I figure that I may as well lump them all at once while I'm at it.
    The laptop model is a Toshiba Dynabook TX/430DX Japanese laptop similar to a Tecra A2 afaik.
    1. If I use stock ARCH kernel, when I load up x11 it seems to be using some wrong drivers or something. Tried with and without xorg.conf. The screen is all fuzzy etc. However, I compiled my own kernel (the Zen sources), took out a whole bunch of drivers I knew I wouldn't be using (etc. SATA/IDE/extra whatnot so that it would merely take 3 hours to compile the kernel), x11 works fine. HOWEVER with the zen sources, when I close x11 I can't exit to console. I get some sort of weird artefact from what happened to be on the screen, or it just goes black. It does actually seem to be in console as I can turn off the laptop with ctrl.alt.del and the capslock etc seems to work fine. I'm thinking of recompiling the zen sources with the stock arch kernel config when I have the time just to see what happens, but I'm not too sure it'd help.
    The VGA device is an: Intel Corporation 82852/855GM Intergrated Graphics Device (rev 02), using the intelfb module.
    2. In most consoles I've used, if you type in part of a command then press ctrl.up/down, it autocompletes with previous commands you've run matching what you've already entered. However, in my install it brings me to the very first command in my bash history. How do I make it autocomplete previous commands?
    3. When I use wvdial (I have a mobile modem), I get odd characters as shown in the screenshot posted.
    I don't think it's a unicode issue, as ncmpcpp displays properly. This displays itself both in the console and in x11 (screenshot).
    4. If I'm using the stock kernel and I stop wvdial, I get a whole bunch of kernel error trace messages. After this, anything that goes to dmesg will be displayed to whatever terminal I'm on (but not actually echoed, it gets overwritten if I change screen etc). Wvdial is also prone to crashing, sometimes taking out the whole laptop. However, while using the zen kernel I do not suffer this issue at all.
    Any help in helping me find the source of these issues would be greatly appreciated. They're not showstopping issues, but extremely irritating nonetheless.
    Thanks in advance.
    EDIT: I created a zen kernel based on the arch stock kernel. Unsurprisingly, I still suffer from the x11 video issue. However, I don't have issues with number 4.
    Last edited by ugugii (2009-06-14 00:57:37)

    People are probably going to want to know the make/model of the lappy before they can
    help.
    Deej

  • Datagrid sorting issues with 1/0 items to consider

    Hi all,
    I have an issue I can't find a way to fix. I am using a datagrid which I pouplate through a XMListCollection based on some XML datas.
    XML:
    var prefs:XML = <files>
    <file name="@toto" favourite="1"/>
    <file name="@toto"favourite="0"/>
    </files>;
    XMLListCollection
    var xlc:XMLListCollection = new XMLListCollection( new XMLList ( prefs.file) );
    MXML
    <mx:DataGrid id="filesList" width="100%" height="100%" dataProvider="{xlc}">
    <mx:columns>
    <mx:DataGridColumn width="25" dataField="@favourite"sortCompareFunction="favourite_sortCompareFunc"/>
    </mx:columns>
    </mx:DataGrid>
    Sorting fucnction:
    private function favourite_sortCompareFunc(itemA:Object, itemB:Object):int {
        var value1:Number = Number( itemA.@favourite );
        var value2:Number = Number( itemB.@favourite );
        if(value1 < value2){
             var n:Number = -1;
             return n;
        else if(value1 > value2){
             return 1;
        else{
             return 0;
        return 1;
    Once loaded, the datagrid appears in a "normal state":
    But if I try to sort first column, it becomes messy
    I think it might be related to the fact that the data to be sorted is only made of 0 & 1. But I can't imagine this kind of situations is not fixable.
    Any hint ?
    Thanks in advance for any advice,
    Loic

    Hi guys,
    First of all, all my apologizes for my silence. I had technical issues with Yahoo mail that made me miss 3 months mail ! So I just missed your posts and I can only come today to thank you all for your care and answers.
    In the meanwhile, I finally got it working by doing…nothing. Let me explain. The issue was caused by equal datas ( 1 or 0 ). So Flex couldn't sort 1 and 1 or 0 and 0 by itself. But these 0 and 1 were flags for an itemrenderer made of a button in toggle mode. 1 standed for on, 0 for off.
    Doing so I did override updateDisplayList and then the issue went away. But if I had to stick with pure datas ( 1 or 0 ) I think I would have had to do a custom sort function to deal with equal datas like a few of you offered.
    @DonMitchinson the @ stands for the xml attribute as the datagrid is populated with XMLListCollection from an XML file.
    Thanks for your sharing,
    Best,
    Loic

  • DataGrid Sorting Issue with Hotfix2

    I already opened a ticket with Adobe on this, but since this
    is a critical issue for us I wanted to post a message to see if
    anyone has any idea where the issue in flex sdk lies.
    Check tab 2 of the sample app, Sorting a datagrid who's
    column only has partial data causes an error, works fine on Hotfix
    1 (same test)
    Sample App:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="creationComplete()">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.utils.ObjectProxy;
    [Bindable]
    public var dgData:ArrayCollection = new ArrayCollection();
    public function creationComplete():void
    var object:ObjectProxy;
    object = new ObjectProxy();
    object["filled"] = "Filled A";
    object["partial"] = "Partial A";
    dgData.addItem(object);
    object = new ObjectProxy();
    object["filled"] = "Filled B";
    object["partial"] = "Partial B";
    dgData.addItem(object);
    object = new ObjectProxy();
    object["filled"] = "Filled C";
    dgData.addItem(object);
    object = new ObjectProxy();
    object["filled"] = "Filled D";
    dgData.addItem(object);
    ]]>
    </mx:Script>
    <mx:XMLList id="treeData">
    <node label="Mail Box">
    <node label="Inbox">
    <node label="Marketing"/>
    <node label="Product Management">
    <node label="Large node Large Node Large Node Large
    Node"/>
    </node>
    <node label="Personal"/>
    </node>
    <node label="Outbox">
    <node label="Professional"/>
    <node label="Personal"/>
    </node>
    <node label="Spam"/>
    <node label="Sent"/>
    <node label="Spam2"/>
    <node label="Sent2"/>
    <node label="Spam3"/>
    <node label="Sent3"/>
    <node label="Spam4"/>
    <node label="Sent4"/>
    <node label="Spam5"/>
    <node label="Sent5"/>
    <node label="Spam6"/>
    <node label="Sent6"/>
    </node>
    </mx:XMLList>
    <mx:TabNavigator height="100%" width="1005">
    <mx:Canvas label="Tree Issue">
    <mx:Text x="284" y="51" fontSize="16" fontWeight="bold"
    text="Issue: Expand the tree node to open up Product Management
    node, no Horizontal Scroll bar appears." width="390"/>
    <mx:Canvas verticalScrollPolicy="auto"
    horizontalScrollPolicy="auto">
    <mx:Tree x="50" y="50" width="226" height="303"
    dataProvider="{treeData}" labelField="@label"
    verticalScrollPolicy="auto" horizontalScrollPolicy="auto"/>
    </mx:Canvas>
    </mx:Canvas>
    <mx:Canvas label="DataGrid Issue">
    <mx:DataGrid id="dgTest" dataProvider="{dgData}"
    width="500" height="300" x="10" y="10">
    <mx:columns>
    <mx:DataGridColumn headerText="Filled Row"
    dataField="filled"/>
    <mx:DataGridColumn headerText="Partially Filled Row"
    dataField="partial"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Text x="10" y="318" fontSize="16" fontWeight="bold"
    text="Issue: Toggle the sort in the column that has only partial
    data. You will get a find criteria error. This worked in Hotfix 2
    and was broke in Hotfix 2." width="390"/>
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:Application>

    Hi,
    With new hotfixes some bugs ( most of bugs) in Flex SDK are
    get fixed, but rarely new (sometimes critical) bugs can appear.
    Before Flex 3 release which will allow on IDE level to switch
    between different versions of Flex SDK on the fly, I would advice
    you to store locallly copy of all versions of Flex 2 SDK released
    to the public. Then, in case if you will encounter a serious bug in
    the most recent release of Flex 2 SDK, you can fix it by yourlself
    by reusing the old code from former release of Flex 2 SDK.
    See what I did with found bug in Flex 2.0.1 release, which is
    what not present in Flex 2.0 SDK release:
    jabbypanda.com/blog/?p=25

  • Selection issue with editable Spark DataGrid

    Hi everyone,
    I am evaluating the new Spark DataGrid and I'm having a very strange issue with the behavior of selection in an editable instance.
    Here is my test application: http://www.playcalliope.com/flex/DataGridSelectionIssue.html (code here: https://gist.github.com/1129160)
    And here are the steps to reproduce the issue:
    select the very first cell at the top-left corner of the grid (the one with "Gabriele");
    click on it once more, the editor appears;
    now click on the cell just to the right of it (the one with "Genta").
    You should see that editing ends as it supposed to do, but selection is placed on the third cell (the one with a 5 in it) instead on the one you clicked on. Playing a little with the grid you should see that this isn't the only case, but selection is really behaving randomly.
    I am using SDK 4.5.1.21328.
    I think this is a very basic usage case.. I can't believe this is not working properly, what am I missing?
    Thanks a lot,
    Gabriele Genta
    Message was edited to add live example

    Your running into a known bug, https://bugs.adobe.com/jira/browse/SDK-30088.
    The  bug will be fixed in the Mega release. To work around the bug you can  create a custom editor and remove the  "dataGrid.validateNow();" call in  DataGridEditor.save().
    Here's how I modified your example to workaround the bug:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   minWidth="955" minHeight="600"
                   backgroundColor="#E7E7E7"
                   creationComplete="application1_creationCompleteHandler(event)">
        <s:layout>
            <s:HorizontalLayout horizontalAlign="center" verticalAlign="middle"/>
        </s:layout>
        <fx:Script>
            <![CDATA[
                import mx.collections.XMLListCollection;
                import mx.events.FlexEvent;
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    testGrid.dataProvider = new XMLListCollection(testData.item);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <fx:XML id="testData" xmlns="">
                <items>
                    <item>
                        <id>1</id>
                        <cognome>Gabriele</cognome>
                        <nome>Genta</nome>
                        <uhm>5</uhm>
                        <bene>molto</bene>
                    </item>
                    <item>
                        <id>10</id>
                        <cognome>Pinco</cognome>
                        <nome>Pallino</nome>
                        <uhm>10</uhm>
                        <bene>poco</bene>
                    </item>
                </items>
            </fx:XML>
            <fx:Component className="MyDefaultEditor">
                <s:DefaultGridItemEditor>
                    <fx:Script>
                        <![CDATA[
                            import mx.collections.ICollectionView;
                            import mx.collections.ISort;
                            override public function save():Boolean
                                if (!validate())
                                    return false;
                                var newData:Object = value;
                                var property:String = column.dataField;
                                var data:Object = data;
                                var typeInfo:String = "";
                                for each(var variable:XML in describeType(data).variable)
                                    if (property == [email protected]())
                                        typeInfo = [email protected]();
                                        break;
                                if (typeInfo == "String")
                                    if (!(newData is String))
                                        newData = newData.toString();
                                else if (typeInfo == "uint")
                                    if (!(newData is uint))
                                        newData = uint(newData);
                                else if (typeInfo == "int")
                                    if (!(newData is int))
                                        newData = int(newData);
                                else if (typeInfo == "Number")
                                    if (!(newData is Number))
                                        newData = Number(newData);
                                else if (typeInfo == "Boolean")
                                    if (!(newData is Boolean))
                                        var strNewData:String = newData.toString();
                                        if (strNewData)
                                            newData = (strNewData.toLowerCase() == "true") ? true : false;
                                if (property && data[property] !== newData)
                                    // If the data is sorted, turn off the sort for the edited data.
                                    var sort:ISort = null;
                                    if (dataGrid.dataProvider is ICollectionView)
                                        var dataProvider:ICollectionView = ICollectionView(dataGrid.dataProvider);
                                        if (dataProvider.sort)
                                            sort = dataProvider.sort;
                                            dataProvider.sort = null;
                                    var oldData:Object = data[property];
                                    data[property] = newData;
                                    dataGrid.dataProvider.itemUpdated(data, property, oldData, newData);
                                    // Restore the sort. The data will not be sorted due to this change.
                                    if (sort)
                                        ICollectionView(dataGrid.dataProvider).sort = sort;
                                return true;
                        ]]>
                    </fx:Script>               
                </s:DefaultGridItemEditor>
            </fx:Component>
        </fx:Declarations>
        <s:DataGrid id="testGrid" width="100%" height="100%"
                    editable="true" selectionMode="singleCell"
                    itemEditor="{new ClassFactory(MyDefaultEditor)}">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn headerText="Prova" dataField="cognome"/>
                    <s:GridColumn headerText="Prova1" dataField="nome"/>
                    <s:GridColumn headerText="Prova3" dataField="uhm"/>
                    <s:GridColumn headerText="Prova4" dataField="bene"/>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>
    </s:Application>

  • Click issue with s:Datagrid on mobile for iPads with retina displays (only left half is clickable)

    I'm currently testing a Flex mobile application (that was originally made for iPad 2) on high rest iPad fourth generation and iPad Air devices.
    I'm having this strange issue where the s:DataGrid, no matter where I use it in the application, will display correctly, but only the left half is clickable to select rows. The number of columns in the DataGrid is not important, nor is the width of the DataGrid, the problem is always present. As soon as you try to click in the right half, it doesn't work.
    The application uses an applicationDPI of 160, and scales properly on the higher resolution devices.
    So this feels like a bug to me, as if the DataGrid scales properly, but not it's clickable area?
    I have tried a bunch of stuff to see if I could work around this issue, like calling invalidate functions and setting the DataGrid's width dynamically, but no change so far.
    At this point I'm open for any suggestions or ideas...
    Edit: After further testing it seems the same is true for the height. I noticed when I added more rows in the grid. Only the top half of the DataGrid can be clicked. So it really looks like a dimension issue with the clickable area?
    Thanks

    I ended up not using the DataGrid, and decided to use the experimental MobileGrid instead, which is not afflicted with this issue.
    So this issue no longer concerns me.
    BTW the default theme of MobileGrid is dark, but can be lightened up with CSS and by extending the MobileGrid skins, up to a point where I almost can't tell the difference v.s. the DataGrid.
    It also performs better then the DataGrid. since it's based on List. With 300 elements, it scrolled noticeably faster.

Maybe you are looking for