G
Guest
How do I set the column width in a datagrid when the datasource is a
dataview? I want to use a dataview so data changes, inserts, and deletes are
disabled.
I can set the column width when I use the DataTable that underlies the
DataView as the DataSource in the DataGrid. When I use the DataTable name as
the MappingName in the DataGridTableStyle, it works like a charm.
However, when I change the DataGrid.DataSource to the DataView, I don't know
what MappingName to put in its DataGridTableStyle. No matter what I put as a
MappingName, the values in the GridColumnStyles.columnwidth are ignored. The
column names show up in the combobox in the GridColumnStyles so it sees data
from the dataview.
Any ideas on what I should do?
dataview? I want to use a dataview so data changes, inserts, and deletes are
disabled.
I can set the column width when I use the DataTable that underlies the
DataView as the DataSource in the DataGrid. When I use the DataTable name as
the MappingName in the DataGridTableStyle, it works like a charm.
However, when I change the DataGrid.DataSource to the DataView, I don't know
what MappingName to put in its DataGridTableStyle. No matter what I put as a
MappingName, the values in the GridColumnStyles.columnwidth are ignored. The
column names show up in the combobox in the GridColumnStyles so it sees data
from the dataview.
Any ideas on what I should do?