Re-arranging order of DataSet

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default Re-arranging order of DataSet

    Is it possible to re-arrange the order of the dataset, not just sort it. If you
    have a look at:

    [url]http://www.ducksoupdesign.net/tak/stock/[/url]

    You will see that I am drawing a table on the screen from a dataset and
    wanting to rearrange the the fields and redraw the table. I've placed a
    datagrid on the page to show that the fields are being sorted, but it appears
    when you do a while loop to get info from the dataset (starting at
    prod_ds.first(); ) the order is still the same.

    Is it possible to rearrage the actaul dataset?

    Thanks

    citizen-erazed Guest

  2. Similar Questions and Discussions

    1. Display dataset results in a random order
      I'm connecting to an MS Access database to retireve my data and wan to display my results in a random order. What i have is a table containing...
    2. ORDER BY clause in asp.net dataset
      I have an aspx page on which is a dataset created in DWMX. The sql query is described in the line CommandText='<%# 'SELECT * FROM booklist ' %>' I...
    3. tips on arranging panels
      Hi all re: FHmxa Win 2000. I have FH on both my laptop and desktop. I have only just notice but on my laptop the panels align to the right of...
    4. Arranging order of sprites
      I have imported an AVI. I have previously added graphics (successfully) on top of the movie (e.g., an arrow). Frequently, however, I am NOT able to...
    5. Arranging in the Score
      Hi I am having some trouble with a Quicktime movie I have placed in the score. I have it as the bottom layer/channel in the stacking order. So, it...
  3. #2

    Default Re: Re-arranging order of DataSet

    When you say rearanging order you mean the order of colums? If that's the case then DataGrid.addColumn() and DataGrid.addColumn() should be the way to go.
    chaos58 Guest

  4. #3

    Default Re: Re-arranging order of DataSet

    Hi,
    Thanks for the reply, but Im not worried about rearranging the columns, I know
    how to do that in the binding. Im not even going to have the datagrid on the
    stage, it's just for testing. I want to rearrange the order in which data comes
    out of the dataset. For example if I arrange them by name descending I would
    like the function Im using to pull the info in that order and redraw the bar
    graph thing I'm using to represent the data.

    At the moment the function goes to the first entry and runs a while hasnext
    loop, which is still pulling the info in the same order, even after a sort.

    citizen-erazed Guest

  5. #4

    Default Re: Re-arranging order of DataSet

    Now I get it. It's all about the bars at the top of the page. Allrighty.

    You have a datagrid (DG) and sorting is done inside DG's list and not inside
    your dataset (DS). Just browse through DG.getItemAt(index).column_name and you
    should probably get the new sorted order. It all has to be done on
    DataGrid.headerRelease event and on sort button clicks. From the usability
    stand point do you really need both? Clicking on the headers should do the
    trick.


    Let me know if it worked!

    chaos58 Guest

  6. #5

    Default Re: Re-arranging order of DataSet

    Hi again

    The datagrid isnt going to be on the final movie, its just there to see what
    is in the dataset while testing - the sort etc. So forget that its on the
    stage... So I'm actually not too sure if the DG.getItemAt(index).column_name
    will work, or how it works for that matter ;)

    Say, for matter of interest, that the datagrid was lpaced off the stage so it
    wasnt visable on runtime, could I use the function mentioned to get a sorted
    list to rebuild the bars?

    I'll have a read up about that. Cheers.

    citizen-erazed Guest

  7. #6

    Default Re: Re-arranging order of DataSet

    If you sort the DS it should work. Till now you sorted the DG and there for DS
    stayed the same. Help also mentions an event, DataSet.modelChanged that could
    trigger the actual re-arranging of the bars.

    Cheers.

    chaos58 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139