G
Gerd B.
I have a very simple public class X, whose fields are all public. I
create an ArrayList that contains a series of instances of X. Then I
bind a DataGrid object's columns to the public fields of class X The
binding fails because "". Now, if I create properties that return the
fields of X, and I bind the DataGrid columns to these properties,
everything works fine.
I would greatly appreciate it if somebody could answer the following
questions:
1. It is possible to bind columns of a datagrid directly to (public)
fields of objects that are stored in an ArrayList? If yes, how?
2. My class X is only a temporary repository of information that I
generate (compute) dynamically, and I have no really good reason to
use an ArrayList either; I just thought this would be a quick
solution. Are there better ways to organize data for display in a
DataGrid?
Thank you in advance for your answer,
Gerd
create an ArrayList that contains a series of instances of X. Then I
bind a DataGrid object's columns to the public fields of class X The
binding fails because "". Now, if I create properties that return the
fields of X, and I bind the DataGrid columns to these properties,
everything works fine.
I would greatly appreciate it if somebody could answer the following
questions:
1. It is possible to bind columns of a datagrid directly to (public)
fields of objects that are stored in an ArrayList? If yes, how?
2. My class X is only a temporary repository of information that I
generate (compute) dynamically, and I have no really good reason to
use an ArrayList either; I just thought this would be a quick
solution. Are there better ways to organize data for display in a
DataGrid?
Thank you in advance for your answer,
Gerd