By the way thanks a lot Ravi for taking your time and very clearly answering my request. You ROCK man!!!!!
On Wed, Feb 25, 2009 at 2:20 AM, Ravi <ravi.achi...@gmail.com> wrote: > > capitals[0].Capitals.capital will bring all the descendents(as > XMLList) which have name as "capital". This is how the XMLList work. > If you want to restrict it to just one node then you can use capitals > [0].Capitals[0].capital or capitals[0].Capitals[1].capital. > > -Ravi > > On Feb 25, 3:05 pm, Vivian Richard <kanps...@gmail.com> wrote: >> 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 <kanps...@gmail.com> wrote: >> > Thanks Ravi!!!!! Let me educate myself from it... >> >> > On Wed, Feb 25, 2009 at 1:32 AM, Ravi <ravi.achi...@gmail.com> 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 <kanps...@gmail.com> 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 <ravi.achi...@gmail.com> 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 <kanps...@gmail.com> 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 flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---