Phew, finally got it working. Sorry for troubling you guys. The issue was that I was giving the dataProvider to the DataGrid only at Runtime.
I put a blank ArrayCollection as a dataProvider to the DataGrid and its working without any issues when I set the dataProvider with results from the server at Runtime. This leads me to think that the dataProvider property should be given, even if its pointing to a collection which is blank. Is this true ???