Hello
Here is my problem.
I'm using a DataTable.DefaulView as a DataSource of my DataGrid.
And I also set a TableStyle (before setting the datasource) to be able to format the columns.
Everything is working fine except in one case:
if my DataTable is empty (no rows).
In that case, when I do:
DataGrid1.DataSource = myDataTable.defaultView
my program crashes. (no error, but take infinites time).
If I do the same without applying my TableStyle, it works fine, as if I add an empty row to my DataTable.
However, I would like to be able to apply my TableStyle and having no rows in my Table.
Is that possible ?
Thanks,
Here is my problem.
I'm using a DataTable.DefaulView as a DataSource of my DataGrid.
And I also set a TableStyle (before setting the datasource) to be able to format the columns.
Everything is working fine except in one case:
if my DataTable is empty (no rows).
In that case, when I do:
DataGrid1.DataSource = myDataTable.defaultView
my program crashes. (no error, but take infinites time).
If I do the same without applying my TableStyle, it works fine, as if I add an empty row to my DataTable.
However, I would like to be able to apply my TableStyle and having no rows in my Table.
Is that possible ?
Thanks,