Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1500
Load DataSource before the grid is displayed
posted

Hello, 

we're using UltraGrid 10.1. Is there a way to force the grid to fully initialize before it's displayed on a form?

What I mean specifically is I need to get column's width by accessing DisplayLayout.Bands[0].Columns[i] after the following code is executed:

var grid = new UltraGrid();
grid.DataSource = new List<string> {"item1", "item2"}; 

However there are no columns in the columns collection until the grid is displayed. InitializeLayout event is not raised until the grid is displayed as well.

How can I force the grid to fully initialize itself right after it's created and DataSource is set?

Thanks,
Vitaly