Update datagrid using datechooser component, mySQL and PHP

Hi there,

I’ve been struggling a few days with this. Any help would be greatly appreciated.
here is my code:


var aSession:Array = new Array();
var myXML:XML = new XML();
myXML.ignoreWhite = true;

test_btn.onRelease = function() {
	myXML.onLoad = loadXML;
	myXML.load("http://localhost/test/get_session.php");
};

function loadXML(bSuccess:Boolean):Void {
	if (bSuccess) {
		var xnRoot:XMLNode = myXML.firstChild;
		for (var i:Number = 0; i<xnRoot.childNodes.length; i++) {
			//mainList_mc.user_ds.removeAll();
			aSession.addItem({sDate:xnRoot.childNodes*.childNodes[1].firstChild.nodeValue, sStudio:xnRoot.childNodes*.childNodes[2].firstChild.nodeValue, sStart:xnRoot.childNodes*.childNodes[3].firstChild.nodeValue, sEnd:xnRoot.childNodes*.childNodes[4].firstChild.nodeValue, sType:xnRoot.childNodes*.childNodes[5].firstChild.nodeValue});
			aSession.reverse();
			mainList_mc.user_ds.items = aSession;
		}
	} else {
		trace("Unable to load XML File.");
	}
}
var myListener:Object = new Object();
myListener.change = function(eventObject:Object) {
	var sendDate:LoadVars = new LoadVars();
	var sDate = calendar_mc.calendar.selectedDate.toString();
	sDate = sDate.substr(0, 9)+sDate.substr(27, 6);
	sendDate.date = sDate;
	sendDate.sendAndLoad("http://localhost/test/get_bydate.php", myXML, "GET");
      myXML.onLoad = loadXML;
	trace(myXML);
};
calendar_mc.calendar.addEventListener("change", myListener);

Here is what I have:

The XML file is coming from php which is taking the nodes data from a mySQL database. As you can see, the XML values are stored in an Array which has been assigned to dataSet component (user_ds). All those values are displayed via a dataGrid component binded to the dataSet. So far it’s working great, but here it comes the problem. Now I would like to use a dateChooser component to retrieve the database data by date. I set up a listener and I’m using LoadVars to send the chosen date to php and mySQL, but even though the variable passes and php outputs the new XML file, the dataGrid doesn’t update.
I’ve never used components before, but I’m pretty sure the problem lies on the XML object and the whole dynamic system which is also a new territory for me. The only thing I tried was to create another XML object to handle the new output, but that didn’t work either. Any ideas?

Thanks in advance for any help!