I am using following lines of code to display the height of datagrid:
DataGrid.height = msgGrid.measureHeightOfItems(0,DataGridCount) + DataGrid.headerHeight;
In my application as soon as i login i have 3 tabs and in each i have a datagrid. Now when i login the height of datagrid is very small and i cant see any row but if i switch to other tab and come back to this tab, datagrid appears beautifully..
I even tried to debug and i found that first time when i login
DataGrid.height gives value which is equal to DataGrid.headerHeight which means msgGrid.measureHeightOfItems(0,DataGridCount) is returning 0; however my datagrid count is cmoning correctly... Once i switch to other tab and then came back to this tab evrything is fine..
Please let me know where I am doing wrong.
Anyone please help
Maybe the data hasn’t arrived when you take your first measurement.