2 Replies Latest reply on Apr 6, 2007 12:03 AM by Ganndlas

    Problems with DataGird.dataProvider

    Ganndlas Level 1
      Ok, first; Sorry that my English isn't very well, but see I'm just 13 years old boy from The Netherlands. Hope you still want to help me guys :)

      Im busy with a site with a: DateChooser, Search form and DataGird. Ive made Active Server Pages and used some states and a lot of Functions() and <Mx:httpService>.
      I want that the DataChooser let see some posttitles in my DataGird, and the same for the Search form. But, when i use this function's:

      quote:

      private function calclicked(evta:Event)
      {
      myGird.dataProvider == "evta.lastResult.items.item"
      }

      private function searchclicked(evtb:Event)
      {
      myGird.dataProvider == "evtb.lastResult.items.item"
      }


      And this Mx:httpService:
      quote:

      <mx:HTTPService id="calclick" result="calclicked(event)" showBusyCursor="true" method="POST" url=" http://localhost/GameBasedScripts/cal.asp" useProxy="false" > <!-- resultFormat="object" -->
      <mx:request xmlns="">
      <selecteddate>{lblneed.text}</selecteddate>
      </mx:request>
      </mx:HTTPService>
      <mx:HTTPService id="searchpost" result="searchclicked(event)" showBusyCursor="true" method="POST" url=" http://localhost/GameBasedScripts/search.asp" useProxy="false" > <!-- resultFormat="object" -->
      <mx:request xmlns="">
      <tags>{txtSearch.text}</tags>
      </mx:request>
      </mx:HTTPService>


      It shows just 'evta.lastResult.items.item' or 'evta.lastResult.items.item' in my DataGird, and not the Data of that. Anyone?
        • 1. Re: Problems with DataGird.dataProvider
          Saskovic
          First remove the quotes from:
          myGird.dataProvider == "evta.lastResult.items.item"

          This, since you inserting a string into the dataprovider this way.
          (Don't you get an error message for this?)

          And if your not using the clicked methods for anything else, you could attach the lastresult directly in the mxml datagrid component. (I'm not sure how anymore, since I rather do my requests from actionscript (instead of using mxml) (URLRequest, databinding, etc.))
          • 2. Re: Problems with DataGird.dataProvider
            Ganndlas Level 1
            quote:

            Originally posted by: Saskovic
            First remove the quotes from:
            myGird.dataProvider == "evta.lastResult.items.item"

            This, since you inserting a string into the dataprovider this way.
            (Don't you get an error message for this?)

            And if your not using the clicked methods for anything else, you could attach the lastresult directly in the mxml datagrid component. (I'm not sure how anymore, since I rather do my requests from actionscript (instead of using mxml) (URLRequest, databinding, etc.))

            Thanks for response :)
            It's working now, but there where alot of more problems,

            One of them:
            quote:

            [Bindable]
            public var:myData:Object
            and put in my DataGird.DataProvider {myData}