Disable sorting in GroupDataModel

Hello

My application insert QVariantMap to a GroupDataModel and it happens on a random time.

When the GroupDataModel has a StandardListItem, it automatically sorts its elements (in alphabetical order)

Is it possible to turn off sorting?

Thank you!

Hello
Perhaps ArrayDataModel would fit better - he's not sort items.

Tags: BlackBerry Developers

Similar Questions

  • Disable sorting in datagrid

    In my application, I have a datagrid with four separate columns, and I was wondering if there is a way to disable the functionality of sort on each column in the DataGrid?

    If not, I'm open to suggestions, but prefer not to use the four elements of the separate list?

    Thank you

    Adam

    Of course, in the DataGrid column includes sortable = "false".

  • disable column sorting and resizing on table view


    Is there a way to disable sorting and resizing of columns in the view table?

    Thank you

    Use

    setSortable (false)

    setResizable (false)

    on each TableColumn

  • Sort column (disable)

    I suspect that there is an easy answer to this...

    To remove the ability to sort the columns, I put all the values for the column position Interaction to 'none '. However, the report of responses still allows the user to sort by any column.

    Other reports, that I created, it worked. What Miss me to disable sorting option for the columns of the report?

    Very much appreciated.

    Bryan

    Sorting of the column headers is not located in the same place as interaction column header. To disable sorting of the column heading, follow these steps:

    (1) open the report in a table view.

    2) click on the properties button from the Table on the upper left side of the screen.

    (3) uncheck the box "enable column sorting in the dashboards.

  • Table incorrect/no sorting

    I have a table with 3 columns.  It had been sorted by the first column (number of CR).  Which works very well.

    I'm trying now to sort instead of the third column.  Part of the result is shown below.  He refuses to sort, ascending or descending.  I can still settle successfully in the first column.  Why not this one?

    It isn't that it is sorting according to a strange rule, its not sort at all by this column.  I disabled sorting by any other column but this.

    Right click on the table - sort = ascending - line - only build column is selected.

    The entries are copied and pasted so avoid any typo hidden or characters to cause this.  I even redid some of the entries to be sure, but he still refuses to sort by this column.

    Everyone has no idea why?

    Thank you.

    PS FM 11 - Windows 7

    Tabel_Sort.jpg

    Additive - after new tests, it is clearly the data itself that FM has a problem with.  The other two columns sort correctly, but it does not sort.

    It looks like a bug. I just tested with different scenarios of periods in a numerical sequence. If one of the first two phases (for example, xx.yy.nn.nnn) have different xx and yy values, then FM sorts these elements.

    FM seems to be looking for left right and did an alpha sort. It assumes that they are all sorted so the third sequence (for example, xx.yy.zz.nnn - the end of zz) is also the same in all terms, i.e. that it is not beyond the third period to see other terms of "nnn".

    Please this file as a bug to: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&product=63

  • I would use mSATA 32 GB SSD in 14z 5423 as data disc normal

    I have a new Inspiration 14z 5423 and it comes with 500 GB HARD drive and an mSATA SSD 32 GB for acceleration. I intend to replace the HDD with a SSD, so I have more acceleration.

    But I don't know how to disable acceleration and use the SSD of 32 GB of normal data storage.

    Any help in appreciated.

    I've been successfully disabled iSRT. But in a slightly different procedure that has been described above. At the time, I received 14z, trie GUI has not been installed. And I went to Dell.com and downloaded iSRT driver installed. Main player has already been associated with the mSATA for accelerated reader.

    If I'm above procedure to disable sorts them in the BIOS, I won't be able to separate the main drive of the mSATA drive. So, here is the procedure I followed.

    -Leave the BIOS for SATA operation setting as it is for the trie.

    -Disable 'Technology Intel Quick Start' in the BIOS because it uses 8 GB mSATA

    (Note that I'm really confused of sorts and iRST, I think Intel should really change)

    -Windows startup

    -Launch GUI TSRI

    -Click on 'Accelerate' tab and click 'disable acceleration.

    -Click mSATA drive icon, and then click 'reset to available.

    -Restart Windows and the mSATA 32 GB is now available as normal storage

  • Method to apply a style HTTP in Cascades/QML?

    Something like AJAX. What is the equivalent in Cascades/QML? What classes should I Explorer in the API?

    Advice would be greatly appreciated.

    Applications vary.

    http://someservice.com/v1/do/blah

    http://someservice.com/v1/do/meh

    The output of the service is JSON.

    I'll take the exit and probably put it in a list (much like the sample application of stamp collector)

    Help me get started at all help or sample code would be really useful. I imagine that it would be useful for developers who integrate their stunts BB10 app API or data of third parties.

    Thank you!

    Hello

    I wrote a simple example application to show how to create an application that consumes a twitter feed and display JSON content crawled in a standard list view.

    First create a new project named 'Twitter', by selecting file-> New-> BlackBerry Cascades C++ Project, and then choose the option "Empty project" Standard.

    We will start by creating a class called TwitterRequest responsible for the download and let us know through the slots and signals that the twitter JSON data is available. This class must be placed in your src/folder of the project

    TwitterRequest.hpp

    /*
     * Copyright (c) 2011-2012 Research In Motion Limited.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     * http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    #ifndef TWITTERREQUEST_HPP_
    #define TWITTERREQUEST_HPP_
    
    #include 
    
    /*
     * This class is responsible for making a REST call to the twitter api
     * to retrieve the latest feed for a twitter screen name. It emits the complete()
     * signal when the request has completed.
     */
    class TwitterRequest : public QObject
    {
        Q_OBJECT
    public:
        TwitterRequest();
        virtual ~TwitterRequest();
    
        /*
         * Makes a network call to retrieve the twitter feed for the specified screenname
         * @param screenname - the screen name of the feed to extract
         * @see onTimelineReply
         */
        void getTimeline(QString screenname);
    
    public slots:
        /*
         * Callback handler for QNetworkReply finished() signal
         */
        void onTimelineReply();
    
    signals:
        /*
         * This signal is emitted when the twitter request is received
         * @param info - on success, this is the json reply from the request
         *               on failure, it is an error string
         * @param success - true if twitter request succeed, false if not
         */
        void complete(QString info, bool success);
    };
    
    #endif /* TWITTERREQUEST_HPP_ */
    

    TwitterRequest.cpp

    /*
     * Copyright (c) 2011-2012 Research In Motion Limited.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     * http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    #include "TwitterRequest.hpp"
    #include 
    #include 
    #include 
    #include 
    #include 
    
    TwitterRequest::TwitterRequest()
    {
    }
    
    TwitterRequest::~TwitterRequest()
    {
    }
    
    void TwitterRequest::getTimeline(QString screenname)
    {
        QNetworkAccessManager* netManager = new QNetworkAccessManager();
        if (!netManager)
        {
            qDebug() << "Unable to create QNetworkAccessManager!";
            emit complete("Unable to create QNetworkAccessManager!", false);
            return;
        }
    
        QString queryUri = "http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_n...";
        queryUri += screenname;
        QUrl url(queryUri);
        QNetworkRequest req(url);
    
        QNetworkReply* ipReply = netManager->get(req);
        connect(ipReply, SIGNAL(finished()), this, SLOT(onTimelineReply()));
    }
    
    void TwitterRequest::onTimelineReply()
    {
        QNetworkReply* reply = qobject_cast(sender());
        QString response;
        bool success = false;
        if (reply)
        {
            if (reply->error() == QNetworkReply::NoError)
            {
                int available = reply->bytesAvailable();
                if (available > 0)
                {
                    int bufSize = sizeof(char) * available + sizeof(char);
                    QByteArray buffer(bufSize, 0);
                    int read = reply->read(buffer.data(), available);
                    response = QString(buffer);
                    success = true;
                }
            }
            else
            {
                response =  QString("Error: ") + reply->errorString() + QString(" status:") + reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toString();
                qDebug() << response;
            }
            reply->deleteLater();
        }
        if (response.trimmed().isEmpty())
        {
            response = "Twitter request failed. Check internet connection";
            qDebug() << response;
        }
        emit complete(response, success);
    }
    

    Then, replace the main.qml with the following content.

    import bb.cascades 1.0
    
    Page {
        content: Container {
            background : Color.DarkRed
            layout : DockLayout {
            }
            ListView {
                layoutProperties : DockLayoutProperties {
                    verticalAlignment : VerticalAlignment.Center
                }
                objectName : "basicTimelineView"
                id : basicTimelineView
                listItemComponents: [
                    ListItemComponent {
                        type: "item"
                        StandardListItem {
                            statusText: {
                                ListItemData.created_at
                            }
                            descriptionText: {
                                ListItemData.text
                                }
                        }
                    }
                ]
            }
        }
        onCreationCompleted: {
            cs.getTimeline("ladygaga");
        }
    }
    

    This is a simple page with a ListView with standard components, indicating the date and the content of the tweet. As you can see, immediately after that page is created a call is made in the c++ code by using the context property 'cs' set in the constructor for the App to retrieve the latest tweets of the usernamed "ladygaga". To learn more about the call c ++ QML here https://bdsc.webapps.blackberry.com/cascades/documentation/ui/integrating_cpp_qml/index.html

    Finally, this linking is the App class. It uses slot machines to handle the "full" signal generated by the class TwitterRequest when data are available, analyzes the data in a model of GroupData and fills the ListView with the recovered data.

    App.HPP

    #ifndef APP_H
    #define APP_H
    
    #include 
    #include 
    
    class App : public QObject
    {
        Q_OBJECT
    
    public:
        App();
    
        /*
         * Called by the QML to get a twitter feed for the screen nane
         */
        Q_INVOKABLE void getTimeline(QString screenName);
    
    public slots:
        /*
         * Handles the complete signal from TwitterRequest when
         * the request is complete
         * @see TwitterRequest::complete()
         */
        void onTwitterTimeline(QString info, bool success);
    
    protected:
        bb::cascades::AbstractPane* m_root;
    };
    
    #endif // ifndef APP_H
    

    App.cpp

    #include 
    #include 
    #include 
    #include 
    #include 
    
    #include "App.hpp"
    #include "TwitterRequest.hpp"
    
    using namespace bb::cascades;
    
    App::App()
    {
        QmlDocument *qml = QmlDocument::create("main.qml");
        qml->setContextProperty("cs", this);
    
        m_root = qml->createRootNode();
        Application::setScene(m_root);
    }
    
    void App::getTimeline(QString screenName)
    {
        //sanitize screenname
        QStringList list = screenName.split(QRegExp("\\s+"), QString::SkipEmptyParts);
        if (list.count() <= 0)
        {
            qDebug() << "please enter a valid screen name";
            return;
        }
        QString twitterid = list[0];
    
        TwitterRequest* tr = new TwitterRequest();
        tr->getTimeline(twitterid);
        connect(tr, SIGNAL(complete(QString, bool)), this, SLOT(onTwitterTimeline(QString, bool)));
    }
    
    void App::onTwitterTimeline(QString info, bool success)
    {
        if (!success)
        {
            qDebug() << "Error retrieving twitter fee: " << info;
            return;
        }
    
        ListView* list = m_root->findChild("basicTimelineView");
        if (!list || list->dataModel() != NULL)
        {
            qDebug() << "basic list already populated";
            return; //if basic timeline list not found or already populated do nothing
        }
    
        // Create a group data model with id as the sorting key
        GroupDataModel* dm = new GroupDataModel(QStringList() << "id_str");
        dm->setGrouping(ItemGrouping::None);
    
        // parse the json response with JsonDataAccess
        bb::data::JsonDataAccess ja;
        QVariant jsonva = ja.loadFromBuffer(info);
    
        // the qvariant is an array of tweets which is extracted as a list
        QVariantList feed = jsonva.toList();
    
        // for each object in the array, push the variantmap in its raw form
        // into the ListView
        for (QList::iterator it = feed.begin(); it != feed.end(); it++)
        {
            QVariantMap tweet = it->toMap();
            dm->insert(tweet);
        }
    
        // set the data model to display
        list->setDataModel(dm);
        list->setVisible(true);
    }
    

    I hope that's enough to help you get started. There are many improvements that can be made, for example using multiple pages, load the ajax style tweets, even having a page where the twitter user name can be changed, and so on of error handling. Good luck!

    See you soon

    Swann

  • How permanently kill (no) auto arrange icons in the windows Explorer 7

    I can't drag and drop icons in the windows Explorer window 7, I can't disable snap to grid, I can not disable the grouping, I can't disable sorting, please any help, hack recording, scripts, tweaks, codes, orders, alternative programs.

    My thought is: If icons can be freely arranged at the office, so the ability to turn the auto organize into folders exist in the system, I'm looking for a way to re - activate.

    Dxcorp,

    Suggestions are welcome; feel free to leave your comments on Windows 7 comments if you want to restore this functionality.

    Lisa
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Is it possible to manually organize your files, i.e. photos?

    I want my photos arranged in the exact order that I took them.  They are different cameras with different file names, so their reorganization by name, it is of no use to me, and in some cases the date has not been set, so accommodating by date does not work.  In all other Windows programs, I was able to move them manually myself for the places where they belong.  I can't do that in this new Windows and it's absolutely maddening.  Is there a possible way to do this without having to rename each of my photos?

    Hello

    It seems that the ability to do so has been disabled in Windows 7 and 8 to win... I wasn't happy either.

    I got lucky and found this site that addresses the issue and at the bottom of the page, provides a link to download a batch of RegEdit file to restore this ability in most conditions.

    I've used it since Win 7 came out, and I now use it on Windows 8 Pro.

    http://www.Unawave.de/Windows-7-tipps/disable-sorting-auto-arrange.html?lang=en

  • using the APEX_ITEM API to APEX 5

    Hello

    Anyone successfully using the APEX_ITEM. SELECT_LIST_FROM_QUERY_XL at APEX 5.0 API call?

    I copied the exact example of documentation and I get the error below.

    SELECT APEX_ITEM. SELECT_LIST_FROM_QUERY_XL (3, job,'job SELECT DISTINCT FROM emp') job

    WCP

    The errors illustrated:

    Failed to parse the SQL query:

    ORA-00932: inconsistent data types: expected - got CLOB

    I think I'm either missing something or there is a bug in the API. Remove the _XL works fine but I have a few tables really long to show that do not match the results of regular size.

    Thanks in advance

    ~ Nico

    Nico_M wrote:

    Anyone successfully using the APEX_ITEM. SELECT_LIST_FROM_QUERY_XL at APEX 5.0 API call?

    I copied the exact example of documentation and I get the error below.

    SELECT APEX_ITEM. SELECT_LIST_FROM_QUERY_XL (3, job, 'Employment SELECT DISTINCT FROM emp') job

    WCP

    The errors illustrated:

    Failed to parse the SQL query:

    ORA-00932: inconsistent data types: expected - got CLOB

    I think I'm either missing something or there is a bug in the API. Remove the _XL works fine but I have a few tables really long to show that do not match the results of regular size.

    Assuming that you see this area of standard report, set the type of column to column report Standard (plain text + escape special characters = No in the Page Designer) and disable sorting for the column.

  • Question of selection with editable Spark DataGrid

    Hello world

    I'm evaluating new Spark DataGrid and I am having a very strange problem with the selection behavior 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 problem:

    1. Select the first cell in the upper left corner of the grid (the one with 'Gabriele');
    2. click it once more, the Editor appears;
    3. now, click on the cell just to the right (the one with "Genta").

    You should see that edition ends as he supposed to do, but the selection is placed on the third cell (the one with a 5 in it) on the one you clicked on. Play a bit with the grid, you will see that this is not the only case, but selection really behaves randomly.

    I use SDK 4.5.1.21328.

    I think that it is a very basic use case... I can't believe that this does not work, what don't get me?

    Thank you very much

    Gabriele Genta

    Message was edited to add the living example

    Your race in a bug known, https://bugs.adobe.com/jira/browse/SDK-30088.

    The bug will be fixed in the Mega version. To work around the bug, you can create a custom editor and delete the "dataGrid.validateNow ()"; call to DataGridEditor.save ().

    Here's how I modified your example to work around the bug:


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx".
    minWidth = "955" = "600" minHeight
    backgroundColor = "#E7E7E7."
    creationComplete = "application1_creationCompleteHandler (event)" > "
       
           
       

       
       
            Import mx.collections.XMLListCollection;
    Import mx.events.FlexEvent;
    protected function application1_creationCompleteHandler(event:FlexEvent):void
    {
    testGrid.dataProvider = new XMLListCollection (testData.item);
    }
    ]]>
       

       
       
           
               
                   
                        1
                        Gabriele
                        Genta
                        5
                        molto
                   

                   
                        10
                        Weill
                        Pallino
                        10
                        poco
                   

               

           

           
           
               
                   
                        Import mx.collections.ICollectionView;
    Import mx.collections.ISort;
                           
    public void save (): Boolean
    {
    If (! validate())

    Returns false;
                               
    newData:Object var = value;
    var property: String = column.dataField;
    Object: data var = data;
    var typeInfo:String = "";
    for each (var variable: XML in describeType (data) .variable)
    {
    If (property == [email protected] ())
    {
    typeInfo = [email protected] ();
    break;
    }
    }
                               
    If (typeInfo is "String")
    {
    If (!) (newData) is String))
    newData = newData.toString ();
    }
    ElseIf (typeInfo == 'As')
    {
    If (!) () newData is uint))
    newData = uint (newData);
    }
    ElseIf (typeInfo == 'int')
    {
    If (!) (newData) is int))
    newData = int (newData);
    }
    ElseIf (typeInfo == "Number")
    {
    If (!) (newData) is number))
    newData = Number (newData);
    }
    ElseIf (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, disable sorting for published data.
    var sort: ISort = null;
    If (dataGrid.dataProvider ICollectionView)
    {
    var dataProvider:ICollectionView = ICollectionView (dataGrid.dataProvider);
    If (dataProvider.sort)
    {
    type = dataProvider.sort;
    dataProvider.sort = null;
    }
    }
                                   
    var oldData:Object = data [well];
    data [property] = newData;
    dataGrid.dataProvider.itemUpdated (data, property, oldData, newData);
                                   
    Restoration of the kind. The data will be not sorted due to this change.
    If (out)
    . Fate ICollectionView (dataGrid.dataProvider) = classification;
    }
                               
    Returns true;
    }
    ]]>
                                   
               
               
           
       
       
       
    Editable = "true" selectionMode = "single-cell".
    itemEditor = "{ClassFactory (MyDefaultEditor) new}" >
           
               
                   
                   
                   
                   
               

           

       

  • APEX. ITEM.popupkey_from_query does not meet the relevant line

    I have a manual tabular presentation that contains a context field. When I click the pop-up icon, it displays the pop-up window. I select the line I want to fill in the field with, but he does not fill in the field correctly. He usually fills the 2nd, but not always.

    I have included the form in the sample Application as a page 22 of apex.oracle.com:

    Workspace: RGWORK
    Username: TESTER
    Password: test123
    Application: Example Application - 25152 (not Sample Application 20726)
    Page: 22: Advanced RG tabular forms

    Top 22 should be run directly.

    I appreciate your help.

    Robert
    http://apexjscss.blogspot.com

    Hello

    You must disable sorting of your form.

    BR, Jari

  • Tabular: new lines problem

    Hello

    I built a tabular presentation, with the possibility to add a line using the following construction:

    Select the null ID
    Field1 null
    of the double
    where: request = 'ADD_ROW.
    UNION ALL
    Select id
    Field1
    table

    It works very well. Adding an application to the Add button, the new line is created on top of my tabular presentation.

    However, if I add the option in the attributes report for users to be able to sort the columns, the apears to the bottom line! I also put the "Sorting NULL values" option to "FIRST."

    Why is this influence, given that my query results in a null-line value and sort options are OK, still the row above apears!

    Help?? Is this a bug in APEX?

    Edited by: Voxie2 may 3, 2010 13:25

    Voxie2,

    Technically, Yes, it's a bug. Your best bet is to disable sorting on tabular forms for now. Maybe this will be fixed in APEX 4...

    Kind regards
    Dan

    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/apex/

  • How to disable automatic sorting in windows 7 - cut / paste issue

    Hello

    I use a folder image with thumbnails with files in numerical order.

    I can manually drag and drop the file from one place to another without automatic sorting.

    That is to say. I can drag the first file in the folder at the end of the list.

    But when I use cut and paste, the file does not move and stays in the same order.

    Is there a way to change its behavior like xp... where do drag and drop, or cut and paste works the same way?

    Thank you for any advise on this topic.

    William

    For those of you who are gifted in registry, visit this link:

    http://www.Winhelponline.com/blog/disable-full-row-select-Explorer-Windows-7/

    Yes; It IS a resolution.  (Scroll down to "#4)  It is not very complicated; Just follow the step by step instructions.  I don't usually respond to forums, but Microsoft really screwed the dog on this one then as a fellow Windows-user, I feel obligated to share the possible resolutions.

    Knowing Microsoft, they will empty this page to try to prevent some users to solve this annoying problem, so I suggest to copy the content of the link and stick to one. DOC or. TXT and share it on other sites there is.

  • GroupDataModel sorting ascending or descending

    How to sort data on GroupDataModel with decreasing or increasing of behavior?

    Hello

    using the code below in the qml you can sort Ascending or descending data model.

Maybe you are looking for

  • HP envy 15t

    Hello I just bought the urge and got the HDD of 750 GB with cache 24GO accelerated. Is there a way I can install a SSD or the WSSD as a primary or initialize disk and keep my HARD drive with caching as a secondary drive in the laptop?

  • Satellite P200 (PSPB3E) - HDMI audio driver, Windows XP Home edition

    Hello I use Windows XP at the moment and I can't seem to find a driver to get the sound on the functioning of the HDMI port. I have the latest drivers for the graphics card using mobility modder. The sound works without no driver install Linux ubuntu

  • Charger lighting up orange, no power. :(Water damage

    The eve of Christmas on my boyfriend spilled a glass of juice on my macbook pro closed Office was on... It was plugged. I assumed it was going to be fine, caught and he wiped away with a cloth but then when I tried to turn it on nothing has happened.

  • How to unlock battery from a laptop Acer Aspire E5-571-5428

    Any help would be received with gratitude, my daughter has just informed that she spilled a cup of milk above and I see that it is in and around the battery. So why I want to remove the battery to see the damage. Thank you

  • OBIEE move from 11.1.1.7.1 to 11.1.1.9.1

    Hi peopleI searched all over the internet for a document of OBIEE 11.1.1.7.1 to 11.1.1.9.1 upgrade, but I get a reliable. Can someone help me by providing a url of a document of good?Thank youOumaima