Great!!!! But I got a question even though this code works
perfect, my understanding
is that since you are putting the dataprovider as
"capitals[0].Capitals.capital" the
datagrid will only show the first element of the XMLList. But how
come it is also
showing the next item and as I added more <Capitals> </Capitals> nodes they
also do show up!!!!!! So I guess my understanding about how this
XMLList dataprovider
is not correct. Could you please clarify it for me.
Regards....
On Wed, Feb 25, 2009 at 1:47 AM, Vivian Richard <[email protected]> wrote:
> Thanks Ravi!!!!! Let me educate myself from it...
>
>
>
>
> On Wed, Feb 25, 2009 at 1:32 AM, Ravi <[email protected]> wrote:
>>
>> Hi Vivian,
>>
>> Here is a small code for XMLList as a dataprovider for datagrid.
>>
>> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
>> <mx:XMLList id="capitals">
>> <root>
>> <Capitals label="U.S. State Capitals">
>> <capital label="AL" value="Montgomery"/>
>> <capital label="AK" value="Juneau"/>
>> <capital label="AR" value="Little Rock"/>
>> <capital label="AZ" value="Phoenix"/>
>> </Capitals>
>> <Capitals label="Canadian Province Capitals">
>> <capital label="AB" value="Edmonton"/>
>> <capital label="BC" value="Victoria"/>
>> <capital label="MB" value="Winnipeg"/>
>> <capital label="NB" value="Fredericton"/>
>> </Capitals>
>> </root>
>> </mx:XMLList>
>> <mx:DataGrid dataProvider="{capitals[0].Capitals.capital}"
>> bottom="20"/>
>> </mx:Application>
>>
>> HTH,
>>
>> -Ravi
>>
>>
>> On Feb 25, 12:11 pm, Vivian Richard <[email protected]> wrote:
>>> Thanks Ravi for the prompt answer. I searched online to find examples
>>> of charts and datagrids with XMLList as dataprovider but could not find
>>> one. Do you know any example online? Or do you have any small snippet
>>> that you can share?
>>>
>>> Regards.....
>>>
>>> On Tue, Feb 24, 2009 at 11:01 PM, Ravi <[email protected]> wrote:
>>>
>>> > Yes XMLList can be used as a dataprovider for datagrids and charts. I
>>> > think you might be missing to reach the correct node of XMLList. Check
>>> > out in the debug mode. You will have to reach the parent of all the
>>> > XML nodes in the XMLList.
>>>
>>> > HTH,
>>>
>>> > -Ravi
>>>
>>> > On Feb 25, 11:46 am, Vivian Richard <[email protected]> wrote:
>>> >> Hello devs,
>>>
>>> >> I was trying to use XMLList as dataprovider for charts and
>>> >> also for datagrid.
>>> >> But for some reason the data is not showing up. Can XMLList be
>>> >> used as
>>> >> dataprovider for charts or datagrid?
>>>
>>> >> Regards....
>> >>
>>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---