DataSets, DataGrid, XML Oh My

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

  1. #1

    Default DataSets, DataGrid, XML Oh My

    OK -= I am sure everyone is tired of hearing about everyone else's problems
    with data binding, but here is another one:)

    I am using the Component Inspector to bind my XML Connector, DataSet, and
    DataGrid. No matter how many times I try it, all I get is a grid with column
    names.

    So, what I need to know is how many bindings XML to dataSet, and dataSet to
    dataGrid,.

    I have tried it MANY differnet ways, but currently, I have:

    XML to dataSet: dataProvider to the resu;lts Schema Array, dataProvider to the
    paramater schema array, and SelectedIndex to dataSet.

    dataSet to dataGrid: dataProvider and SelectedIndex.

    When I open the SWF, it shows a grid with column names and no data. If I click
    on a column I get an error that reads:

    Property 'Location' (or any column name) not found in schema for dataSet
    'cs_ds' can't build index.

    My XML is as follows:

    <?xml version="1.0" encoding="iso-8859-1"?>
    <Summary>
    <CallRow>
    <Call>#Q500COG30</Call>
    <Priority>3</Priority>
    <Type>1182</Type>
    <Group>PD</Group>
    <Area>512</Area>
    <Unit></Unit>
    <From>07:10</From>
    <To></To>
    <Location>Datadata</Location>
    </CallRow>
    <CallRow>
    <Call>#Q500CO232</Call>
    <Priority>3</Priority>
    <Type>415M</Type>
    <Group>PD</Group>
    <Area>112</Area>
    <Unit>1A35</Unit>
    <From>07:11</From>
    <To></To>
    <Location>datadata</Location>
    </CallRow>
    <CallRow>
    <Call>#Q500COO32</Call>
    <Priority>3</Priority>
    <Type>459C</Type>
    <Group>PD</Group>
    <Area>582A</Area>
    <Unit>312</Unit>
    <From>07:11</From>
    <To></To>
    <Location>DATADATA</Location>
    </CallRow>
    </Summary>

    Any ideas???

    TIA

    Thia

    truly_great Guest

  2. Similar Questions and Discussions

    1. bind two datasets together
      Hey guys, Basically what I need to do is to bind two datasets together so they each have a copy of the same data. Then I'll put a filter on one...
    2. SAS Datasets
      Does ColdFusion work with SAS datasets, or do they need to be converted?
    3. WebServices and Datasets
      Hi, I have a situation where I have a Rich Client Win Form App built in C# and I need to transport a dataset across the internet to a webservice...
    4. Datasets & Controls
      I have 5 controls on a page, each having it's own connection to a database and different queries per control. Each control is displayed by the user...
    5. Combining Datasets to a DataGrid
      I have a table containing the following fields: rep numbers, year, month, qty, revenue, credit apps, new accounts. The data in this table...
  3. #2

    Default Re: DataSets, DataGrid, XML Oh My

    I may need to catch up to you a bit, but try this, if you have binded to the
    CallRow Atribute in the XML Connector then in the results listener, print out
    [yourDataSet].items[0].Call and you should get your first value...

    Make sure your bind to your dataGrid is from dataProvider to dataProvider of
    the DataSet. Also make sure if you are trying to bind within a movie and not
    on a screen, that the bind is happening in the first frame of your movie or
    scene.

    If all that is fine, then you can use a cellRenderer to array the data into
    your DataGrid as such:

    datagrid.getColumnAt(0).cellRender = "cellRendererScript";

    Do you know how to do a cellRenderer script, if not reply and say so and I'll
    add it.


    conquerors04 Guest

  4. #3

    Default Re: DataSets, DataGrid, XML Oh My

    I went and looked up the cellrenderer in Flash help but its looking a bit like Greek to me:) I would appreciate any help you can give:)
    truly_great Guest

  5. #4

    Default Re: DataSets, DataGrid, XML Oh My

    I am having similar problems and I think I can reduce the problem a little more
    basically,

    Conider the tutorial from Macromedia,
    [url]http://livedocs.macromedia.com/flash/8/main/00000354.html[/url] which uses the XML
    file,

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <datapacket>
    <row act="10" custId="0" date="05/12/2002" billable="true" duration="3"
    id="1" notes="Here is note(1)" projId="1" rate="45.50" servId="0"/>
    <row act="9" custId="0" date="05/13/2002" billable="true" duration="8.25"
    id="2" notes="Here is note(2)" projId="1" rate="45.50" servId="1"/>
    <row act="8" custId="0" date="05/14/2002" billable="false" duration="7.75"
    id="3" notes="Here is note(3)" projId="1" rate="45.50" servId="1"/>
    <row act="7" custId="0" date="05/15/2002" billable="false" duration="6.5"
    id="4" notes="Here is note(4)" projId="1" rate="45.50" servId="2"/>
    <row act="6" custId="0" date="05/16/2002" billable="false" duration="5.5"
    id="5" notes="Here is note(5)" projId="1" rate="45.50" servId="2"/>
    </datapacket>

    The tutorial carefully steps you through the process of creating the Bindings
    and the Schema in all three components. But now I'd like to try my own XML
    file and DataGrid, but my XML file is a little different. Here is a sample of
    what I am looking at,

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ROOT SYSTEM "CountrySample.dtd">
    <ROOT>
    <row>
    <field name="Code">AFG</field>
    <field name="Name">Afghanistan</field>
    <field name="Continent">Asia</field>
    </row>
    <row>
    <field name="Code">NLD</field>
    <field name="Name">Netherlands</field>
    <field name="Continent">Europe</field>
    </row>
    <row>
    <field name="Code">ANT</field>
    <field name="Name">Netherlands Antilles</field>
    <field name="Continent">North America</field>
    </row>
    <row>
    <field name="Code">ALB</field>
    <field name="Name">Albania</field>
    <field name="Continent">Europe</field>
    </row>
    <row>
    <field name="Code">DZA</field>
    <field name="Name">Algeria</field>
    <field name="Continent">Africa</field>
    </row>
    </ROOT>

    In the Macromedia tutorial, the data are attributes in the row element and the
    field names are the attribute names. In my example the child element is the
    field and the field name is the attribute "name".

    I can find no documentation to help make the transition from the demonstrated
    XML to this other schema. I haven't the slightest idea what to do.

    How do you apply the Component Inspector and the Properties windows for
    XMLConnector, DataSet and DataGrid to display this data in the DataGrid?


    wizbang 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