js:dataGrid shows blanks instead of data.
The dataGrid component:
<j:VGroup id="VGroupContainer">
<j:Button text="Load Data" width="200" height="60" click="OpenData(event)"/>
<js:DataGrid rowHeight="40" y="200" visible="true" id="dataGrid" width="330">
<js:columns>
<js:DataGridColumn label="Name" dataField="Name" id="nameField" columnWidth="130"/>
<js:DataGridColumn label="SO" dataField="SOname" id="soField" columnWidth="100"/>
<js:DataGridColumn label="Email" dataField="Email" id="emailField" columnWidth="100"/>
</js:columns>
</js:DataGrid>
</j:VGroup>
The Function to Dynamically Update the data. As context, I will be using HTTPservice calls to retrieve data from the server and update the datagrid accordingly. For testing purposes I am using the following:
protected function OpenData(event:MouseEvent):void
{
var obj:Object=new Object();
obj.Name = "record 1"
obj.SOname = "SO1"
obj.Email = "email 1"
var obj2:Object=new Object();
obj2.Name = "record 2"
obj2.SOname = "SO2"
obj2.Email = "email 2"
var obj3:Object=new Object();
obj3.Name = "record 3"
obj3.SOname = "SO3"
obj3.Email = "email 3"
arrData.addItem(obj)
arrData.addItem(obj2)
arrData.addItem(obj3)
dataGrid.dataProvider = arrData;
}
Whenever I set the dataProvider to a value, the dataGrid seems to have the correct rows but no data shows up. You can actually click and select a row but visually none of the cells show up:
Has anyone worked with the Datagrids in apache royale lately? I am wondering if I am even using the correct component. I am migrating from s:Datagrids and never had this issue.