DataGrid sort efficiency questions

Hi,
I guess I have two specific questions:
1. Is sorting a DataGrid faster/slower/same by applying a
sortCompareFunction to a specific column vs. applying a Sort object
directly to the underlying dataprovider?
2. It says in the following link that if you use a
labelFunction on a column, you must also use a sortCompareFunction:
dataGridColumn.sortCompareFunction
ASDOC
Is this really true - anyone know why?
Thanks!
-Noah

Alexander,
In Flex 3 sorting is controlled by the collections rather than the controls. This provides greater flexibility overall despite making it hard to adjust to. To get or set a sort on the DataGrid in Flex 3, use the sort property of its dataProvider:
ListCollectionView(dataGrid.dataProvider).sort
You can both read and write to the sort property. When you write to it, you have to call refresh() after for it to apply. Refer to the documentation on the ListCollectionView class for how to properly get and set its sort property.
Thanks,
Philip

Similar Messages

  • Efficiency Question - Cutting Clips

    Efficiency Question - Cutting Clips.
    So I was wondering if there is a better way to cut my clips that I am not using. Basically I often have large long clips of raw footage that I cut down to the usable segments. Each raw file may be over an hour long and have 100s of small segments of live commentary, often I find I am cutting out slightly to long pauses in the talking and other stuff before I have a clip ready to send to the main edit.
    Anyway, often I am zoomed will in so I can edit, and I press C, make a cut.. then make another a bit further up, press V, click on the segment I just cut out.. press delete and then click on and move the rest of the raw clip to the left to bump up where I made the first cut, often needing to zoom well out and then back in again to continue editing.
    Is there a better way to do this? So I do not need to zoom in and out all the time... is there a way to delete a chunk of video form the sequence and have the clip automatically "close the gap" for me?
    --Thanks

    I would take the Source Clip into the Source Monitor.
    Mark an In Point  ("I")  where the good content starts...and an Out Point ("O")  where the good content stops.
    Hit "," to Insert it to the Sequence.
    Back to Source Monitor and repeat for the next section of good content in the same Source Clip..
    No gaps . Done
    Then ..if necessary...I would play thru  the Sequence and do Trim Edits at the editpoints.
    Many different ways to "skin the cat" at Trim stage.
    Alternatively in the first part:
    I would take the Source Clip into the Source Monitor.
    Mark an In Point ("I") where the good content starts...and an Out Point ("O") where the good content stops.
    CTRL-Drag to the Program Monitor.

  • DataGrid sort start/completion:  specific associated events?

    Hi all,
    A lot of my DataGrid sorts take a non-trivial amount of time.
    So, I'd like to show a busy cursor while the operation runs. In
    order to do this I'd need events associated with the start and
    completion of the operation. Are there such events available?
    Thanks!
    -Noah

    This thread was "imported" from the old forums -- most, if not all, code seems to have disappeared. But here are the sort functions I posted:
    function sortXML(source:XML, elementName:Object, fieldName:Object,
    options:Object = null):XML
         // list of elements we're going to sort
         var list:XMLList=source.elements("*").(name()==elementName);
         // list of elements not included in the sort -
         // we place these back into the source node at the end
         var excludeList:XMLList=source.elements("*").(name()!=elementName);
         list= sortXMLList(list,fieldName,options);
         list += excludeList;
         source.setChildren(list);
         return source;
    function sortXMLList(list:XMLList, fieldName:Object, options:Object =
    null):XMLList
         var arr:Array = new Array();
         var ch:XML;
         for each(ch in list)
               arr.push(ch);
         var resultArr:Array = fieldName==null ?
               options==null ? arr.sort() :arr.sort(options)
               : arr.sortOn(fieldName, options);
         var result:XMLList = new XMLList();
         for(var i:int=0; i<resultArr.length; i++)
               result += resultArr[i];
         return result;

  • 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

  • Noobish "efficiency" question on DataOutputStream

    So, I currently have this:
    byte[] buf = some_bytes;
    DataOutputStream out = new DataOutputStream(socket.getOutputStream());
    out.writeInt(buf.length);
    out.write(buf);I've always thought that calling write(byte[]) and any given OutputStream will be "efficient", in that things will be chunked under the hood to avoid incurring whatever I/O overhead is present for each and every byte. So, as I understand it, we only need to explicitly use BufferedOutputStream if we're writing one or a few bytes at a time.
    Now I'm not so sure.
    Digging through the core API source code a bit, it seems that this ultimately calls OutputStream.write(byte) in a loop, which, presumably, is bad unless the OutputStream in question is a Buffered one.
    Am I shooting myself in the foot here? Should I be wrapping that DataOuputStream around a BufferedOutputStream? Or vice versa?
    Or should I just scrap the DataOuputStream altogether and write the int's bytes out myself?
    I'm going to test it both ways, but in the meantime, and just in case the tests are not definitive, I'm wondering if anybody here can tell me what I should expect to see.
    I think I've been staring at this stuff for a bit too long and am second-guessing myself to death here no matter which way I look at it. So thanks in advance for any nudge you can give me back toward sanity.
    Edited by: jverd on Feb 16, 2012 3:59 PM

    EJP wrote:
    So, what's the point of the basic OutputStream not being buffered then?I guess the idea was that if you want buffering you say so,Ok.
    I think you'll find that every significant class that extends OutputStream (specifically FileOutputStream and SocketOutputStream) overrides write(byte[], int, int) to do an atomic write to the OS, so it isn't really such an issue except in the case of DataOutputStream (and not ObjectOutputStream, see above).Okay, so, in this case, I've got a DataOutputStream wrapped around a SocketOutputStream. It's not an issue for SOS, but it is for the wrapping DOS. Yes?
    So to overcome the DOS doing a bunch of piddly 1-byte writes to the SOS, which in turn could result in a bunch of piddly 1-byte writes to the network, which I don't want, I inject a BOS between them. Yes?
    Thanks for the help. I can't believe after all these years I never got these details sorted out. I guess it never came up quite this way before.

  • Hash Table efficiency question

    Hi experts,
    In my program, I want to read in a lot of string and store the occurance of each string. I found that hash table is the best and most efficient option, but the problem is that, hash table only store one item.
    So, I either have to:
    1) store an array object into each hash table entries. ie String[String][Occurance]
    2) create two hash table based on the hash code of the string.
    For 2) I am planning to store all distinct String into one hashtable using the string as the hashcode, then create another hashtable to store the occurance using the String as the hashcode.
    My question is that:
    1)which implementation is more efficient? Constantly creating String array for each entry or create two hashtables?
    2) Is the second implementation possible? Would the hashcode be mapped to different cell in the hashtable even the two hashtable are using the same hashcode and the same size?
    Thank you very much for your help.
    Kevin

    I am wondering what it is you are trying to do, but I am assuming you are trying to find the number of occurrences for a particular word, and then determining which word has the highest value or the lowest value? You can retrieve the initial String value by using the keys() method of the hashtable. You can use it to traverse the entire table and compare the counts there.
    If you really wanna store another reference for that string, create a simple object
    public final class WordCount {
       * The Word being counted.
       * @since 1.1
      private String _word;
       * Count for the Number of Words.
       * @since 1.1
      private int _count;
       * Creates a new instance of the Word Count Object.
       * @param word The Word being counted.
       * @since 1.1
      public WordCount(final String word) {
        super();
        _word = word;
        _count = 0;
       * Call this method to increment the Count for the Word.
       * @since 1.1
      public void increment() {
        _count++;
       * Retrieves the word being counted.
       * @return Word being counted.
       * @since 1.1
      public String getWord() {
        return _word;
       * Return the Count for the Word.
       * @return Non-negative count for the Word.
       * @since 1.1
      public int getCount() {
        return _count;
    }Then your method can be as follows
    * Counts the Number of Occurrences of Words within the String
    * @param someString The String to be counted for
    * @param pattern Pattern to be used to split the String
    * @since 1.1
    public static final WordCount[] countWords(final String someString, final String pattern) {
      StringTokenizer st = new StringTokenizer(someString, pattern);
      HashMap wordCountMap = new HashMap();
      while (st.hasMoreTokens()) {
        String token = st.nextToken();
        if (wordCountMap.containsKey(token)) {
          ((WordCount) wordCountMap.get(token)).increment();
        } else {
          WordCount count = new WordCount(token);
          count.increment();
          wordCountMap.put(token, count);
      Collection values = wordCountMap.values();
      return (WordCount[]) values.toArray(new WordCount[values.size()]);
    }Now you can create your own comparator classes to sort the entire array of Word Count Objects. I hope that helps
    Regards
    Jega

  • Efficiency Question: Simple Java DC vs Used WD Component

    Hello guys,
    The scenario is - I want to call a function that returns a FileInputStream object so I can process it on my WD view. I can think of two approaches - one is to simply write a simple Java DC that does so and just use it as a used DC so I can call the functionality from there. Or create another WD DC that exposes the value (as binary) via component interface.
    I'm leaning on the simple Java DC approach - its easier to create. But I'm just curious on what would be the Pro-side (if there's any) if I use the WD Component interface approach? Is there a plus for the efficiency? (Though I doubt) Or is it just a 'best/recommended practice' approach?
    Thanks!
    Regards,
    Jan

    Hi Jan
    >one is to simply write a simple Java DC that does so and just use it as a used DC so I can call the functionality from there
    Implemented Java  API for the purpose mentioned in your question is the right way, I think. The Java API can be even located in the same WebDynpro DC as your WebDynpro components. There is not strongly necessity to put it into separate Java DC.
    >Or create another WD DC that exposes the value (as binary) via component interface
    You should not do this because in general WD components' purpose is UI, not API. Implementing WD component without any UI, but with some component interface has very-very restricted use cases. Such WD component shall only be a choice in the cases when the API is WebDynpro based and if you have to strongly use WebDynpro Runtime API in order to implement your own API.
    If your API does not require WebDynpro Runtime API invocations or anything else related to WebDynpro then your choice is simple Java API.
    >But I'm just curious on what would be the Pro-side (if there's any) if I use the WD Component interface approach? Is there a plus for the efficiency?
    No. Performance will be better in simple Java API then in WebDynpro component interface. The reason is the API will not pass thought heavy WebDynpro engine.
    BR, Siarhei

  • Moving Multiple Albums & Album Sort Order Questions

    Hopefully this is a really easy question to answer, but I just can't figure out how to do this.
    1. Can you move multiple albums around in Aperture? I just imported my iPhoto libraries and I'd like to groups a set of the albums that I have into one project. The problem is that I can only move one album at a time.
    2. Can you specify the sort order or manual set the order that albums appear in projects or folders? It seems that Aperture automatically sorts them alphabetically.
    Thanks!

    1. Can you move multiple albums around in Aperture?
    unfortuantely, as far as i am aware you can only move one at a time
    2. Can you specify the sort order or manual set the
    order that albums appear in projects or folders? It
    seems that Aperture automatically sorts them
    alphabetically.
    you are correct, automatically alphabetically only ... i haven't been abble to change this at all ... the only way to force something else is by adding a ~ or other character that is ahead of 0 ...

  • DataGrid Sorting Problem

    Hi all,
    We are running one query from Sql Query Analyser ,
    for selecting values and displaying it in ascending order.
    We are executing the same query from coding to load in to
    datagrid , but its not arranging it by ascending order instead
    its sorting randomly.
    Because of this, if i select particular row from Datagrid, its not fetching
    the selected row from the grid instead its taking corresponding row number's
    value.
    Thanks
    Vaithy

    HI  vaitheeswaran l...    ,
    yeah what u said is correct grid takes in that manner when u are using collapse levels.try without using collapse levels.if u want using collapse levels it wont come
    Edited by: micheal willis on Oct 9, 2009 11:34 AM

  • Question being asked multiple times but need to sort the questions into the report

    question needs to be placed 150 times on the form, but needs to be sorted as if it were one question on the report

    Hello seaturtles24
    Check out the article below for repeated requests for authorizations in iTunes.
    iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
    http://support.apple.com/kb/ts1389
    Regards,
    -Norm G.

  • Datagrid sorting

    Hello,
    I have a problem when it comes to sorting a datagrid with multiple fields. I have two fields A and B . B has numerical values . How can i sort B yet also change the data in A since they are dependent from each other?
    This is my datagrid
    <s:DataGrid id="rankinggrid" includeIn="Ranking" x="156" y="84" width="528" height="229"
                                            dataProvider="{gridrank}" requestedRowCount="4">
                        <s:columns>
                                  <s:ArrayList>
                                            <s:GridColumn dataField="sequrank" headerText="Sequence" sortDescending="true"></s:GridColumn>
                                            <s:GridColumn dataField="coeff" headerText="Coeffiecent"></s:GridColumn>
                                  </s:ArrayList>
                        </s:columns>
                </s:DataGrid>
    Basically i want to sort coeff in desending order but i want to data in seqrank to move accordingly.
    Thanks for your help
    P.s i am managing to populate the datagrid so all i need is to sort it thanks

    Thanks for your help again
    I have reduced the code since the original code is very lengthy and hence impossible to post , yet this should work.
    Here i am sorting the grid array according to cost. The problem is that it doesnt work it out in a descending manner(the command you told me doesnt work it gives me an error ) i have used sort and it sorts it in an ascending way and does not give me an error
    I would like to solve in a descending way Hope you can help thanks for your time i really appreciate
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                         xmlns:s="library://ns.adobe.com/flex/spark"
                                                         xmlns:mx="library://ns.adobe.com/flex/mx"
                                                         creationComplete="init()"
                                                         width="800" height="600">
              <fx:Declarations>
                        <s:ArrayCollection id="ProcessAdder">
                                  <fx:Object ProcessName ="Milling" Cost ="240" Service_Rate="14"  />
                                  <fx:Object ProcessName ="Lathe" Cost ="975" Service_Rate="9" />
                                  <fx:Object ProcessName ="Boring" Cost ="800" Service_Rate="8" />
                                  <fx:Object ProcessName ="Drilling" Cost ="270" Service_Rate="20"  />
                        </s:ArrayCollection>
              </fx:Declarations>
              <fx:Script>
                        <![CDATA[
                                  import mx.collections.*;
                                  import mx.collections.ArrayCollection;
                                  import mx.collections.Sort;
                                  import mx.collections.SortField;
                                  public function init(){
                                  var mySort:Sort = new Sort();
                                  // Set the sort field; sort on the last name first, first name second.
                                  var sortfieldRank:SortField = new SortField("Cost", Sort); //descendingSort
                                  mySort.fields = [sortfieldRank];
                                  // Apply the sort to the collection.
                                  //gridrank.sort = mySort;
                                  ProcessAdder.sort = mySort;
                                  ProcessAdder.refresh();
                        ]]>
              </fx:Script>
              <mx:Legend dataProvider="{ProcessAdder}"/>
              <mx:DataGrid id="ProssGrid" x="22" y="334" width="715" dataProvider="{ProcessAdder}"
                                            >
                        <mx:columns>
                                  <mx:DataGridColumn dataField="ProcessName" headerText="Process Name"/>
                                  <mx:DataGridColumn dataField="Cost" headerText="Cost"/>
                                  <mx:DataGridColumn dataField="Service_Rate" headerText="Service Rate"/>
                        </mx:columns>
              </mx:DataGrid>
    </s:WindowedApplication>

  • DataGrid Sort Clears HeaderRenderer Checkbox

    I have a datagrid that I defined a checkbox as the
    headerrenderer for one of the columns. It took me a while to track
    this down, but it seems like a re-sort on one of the columns (other
    than the checkbox headerrenderer column) clears the state of the
    checkbox and resets it to chexkbox.selected=false.
    Is there any way to persist the checkbox selected property of
    a headerrenderer checkbox instance on re-sort.
    I played with disabling the default sort methods and creating
    my own sort functionality by only allowing a specific column to be
    sorted. That didn't solve my problem though.
    Thanks,
    JB

    I did something similar with my DataGrid. The way I solved
    the problem was to make a global variable to hold the checkBox's
    checked value and then on the checkbox's click event ran a global
    function to handle the setting of the global var:
    <mx:DataGridColumn id="copyColumn" dataField="check"
    width="35">
    <mx:headerRenderer>
    <mx:Component>
    <mx:HBox horizontalAlign="center"
    verticalAlign="middle">
    <mx:CheckBox id="check"
    tabIndex="1" labelPlacement="top" selected="
    {outerDocument.check_flg}"
    click="
    outerDocument.checkAll(check.selected)" height="18" />
    </mx:HBox>
    </mx:Component>
    </mx:headerRenderer>
    </mx:DataGridColumn>
    note that the above code is contained in a component that
    extends mx:DataGrid
    I think you can get the jist...

  • Datagrid sorting issue

    I have two datagrids. After a form is submitted, datagrid 1
    is populated. Clicking on any of the rows will submit to another
    query and populate datagrid 2.
    If I have submitted my form and datagrid 1 is populated, and
    I sort the columns, it will sort and kick of the second query.
    Instead of sending to the HTTP service directly when clicking
    on datagrid 1 header or row, I have it going to a routine. If the
    user has not selected a row, and clicks a column, it will sort but
    not submit.
    However, that only gets me half the way there. If a user
    selected a row in datagrid 1, and then sorts, it will still submit
    to datagrid 2. Again, I don't see why if I'm clearly clicking on
    the column header to sort that it should submit also.
    Is there a way to make the column header independent of the
    rows?

    I would not have expected that.
    Pass "event" into the itemClick handler.
    Use it to determine what was clicked, and do not make your
    data service call if it is the header row. Not exactly how to
    determine that, you will need to look at the contents of that
    event. Maybe rowIndex = -1?
    Tracy

  • 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

  • Figuring out datagrid sort programmatically

    OK I've got a datagrid with 4 columns. I'm giving the end
    user the opportunity to sort on any of these columns. They also
    have a report that is generated based on the data in the grid, but
    I'm wondering how determine on which column the grid is sorted, and
    which (ascending / descending) order so that I can sort the report
    in that exact same manner.
    I've added some code on the headerRelease event to track this
    information (storing it in the Cairngorm ModelLocator), but if you
    trace the results it doesn't foot to what you're actually doing,
    for example the following writes inconsistent (to the apparent
    action being taken in the interface) info to the console. I can
    always get the correct dataField property, but its sortDescending
    property is almost always opposite of what the datagrid displays:
    private function
    handleHeaderRelease(dgEvent:DataGridEvent):void
    for(var k:int=0;k<myGrid.columns.length;k++)
    trace(myGrid.columns[k].dataField + ":" +
    myGrid.columns[k].sortDescending);
    trace("");
    Does anyone know of a better way to figure out on which
    column the grid is currently sorted, and what sort nature is
    currently applied?
    TIA,
    Joe

    OK I figured this out after remembering that the dataprovider
    of the datagrid is just an ArrayCollection - here's the answer for
    anyone who's looking for the same thing.
    In the function that calls the report:
    var s:Sort;
    var sF:SortField;
    s = summaryGrid.dataProvider.sort;
    // if sort is null, they haven't clicked any column headers,
    so use the default
    if(s == null)
    urlVariables.sortOrder = "dtAdded";
    urlVariables.sortNature = "DESC";
    otherwise use the first sort field
    (this could be modified to build an appropriate order by
    statement for multiple
    sort fields if necessary)
    else
    sF = s.fields[0];
    urlVariables.sortOrder = sF.name;
    urlVariables.sortNature = sF.descending?"DESC":"ASC";
    Hope this helps someone!

Maybe you are looking for

  • NewBie Question: Can you make a website completely with Java?

    Greetings my new Fellow Java programmers. My name is Jason and I am a computer programmer and web developer. I am verse in the following: 1. HTML/XHTML 2. CSS 3. Asp.net 4. VB.Net 5. SQL I want to expand my skills to include: 1.JAVA 2. Action Script

  • Photoshop/Bridge CS4 PDF Presentation Update or Plug-in

    Full Parameter PDF Presentation is essential for me. PDF Presentation (as in Photoshop - Bridge CS2 and CS3) with panels for selection of presentation prameters and saving with various levels of jpeg compression and image quality, presets and output

  • How to Trigger the process in XI

    Hi, How to start trigger the process in XI? In my scenario first step need to Starts in XI . So can you please guide me how i can proceed. Thank you very much. Sateesh

  • CTL + E quit working

    I can no longer enter InContext Editing mode by typing control + E.  This problem started about 2 days ago.  When I type control+e, instead in starting the editor, the coursor moved to the browser's search box instead (ctl+k is suposed to active this

  • Cannot un-install or re-install itunes

    When i try to open itunes, it says it has encountered an error and needs to be re-installed. When i try to re-install itunes, an error comes up saying "itunesMiniPlayer.Resources is not a valid short file name" and it will not let me re-install itune