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
560
XamDataGrid not loading/showing field layout until grid's source has any data
posted

Hi,

I have a XamDataGrid that is bound to a data source. One of the use cases is where the data source is empty. When the grid loads for this use case I see that the layout is never rendered. Only when the datasource gets the first record does the grid render the layout (and then shows the new record). What can I do so that the grid does render the layout even when the source has no data?

I have FieldLayoutSettings.AutoGenerateFields= "False". Following is the way I add my custom layout:

_grid.FieldLayouts.Clear();

_fieldLayout.IsDefault =

 

true;

_grid.FieldLayouts.Add(_fieldLayout);

_grid.DefaultFieldLayout = _fieldLayout;

 

Thanks,

Joe