B
Bruce Schechter
I have an ArrayList (myArrayList) in which each element is an object of a
custom class called DataRecord. DataRecord only exposes its internal data
in the form of an indexer. During runtime, I need bind myArrayList to a
DataGrid to display all elements of the ArrayList in the DataGrid. The
number of elements of the DataRecord indexer is only known at runtime.
I can of course do this...
dataGrid.DataSource = myArrayList;
But how can I programmatically specify that I want to set the indexer of
DataRecord as the data to be displayed in the columns of the DataGrid? Can
I set the .MappingName property of each column one-by-one somehow?
Thanks,
Bruce
custom class called DataRecord. DataRecord only exposes its internal data
in the form of an indexer. During runtime, I need bind myArrayList to a
DataGrid to display all elements of the ArrayList in the DataGrid. The
number of elements of the DataRecord indexer is only known at runtime.
I can of course do this...
dataGrid.DataSource = myArrayList;
But how can I programmatically specify that I want to set the indexer of
DataRecord as the data to be displayed in the columns of the DataGrid? Can
I set the .MappingName property of each column one-by-one somehow?
Thanks,
Bruce