DColin
asked on
ListView column headers
Hi Experts,
If I have an arraylist populated with a customer class:
customer.firstName
customer.lastName
customer.age
It is possible to bind a listview control to this arraylist so that the column header names are automatically taken from the class members so that the column headers would be:
firstname, lastName, age.
If I have an arraylist populated with a customer class:
customer.firstName
customer.lastName
customer.age
It is possible to bind a listview control to this arraylist so that the column header names are automatically taken from the class members so that the column headers would be:
firstname, lastName, age.
ASKER
miketonny:
The header names are not part of the array.
Is it possible to access the class members name. So for example:
customer.firstName.membern ame would return "firstName"?
The header names are not part of the array.
Is it possible to access the class members name. So for example:
customer.firstName.membern
What are you trying to achieve? Make the display display any collection? Why not use a DataTable and a DataGridView?
ASKER
CodeCruiser:
Yes I am trying to create a display table that will display any class or data type and automatically set to headers to the name of the data variable.
Yes I am trying to create a display table that will display any class or data type and automatically set to headers to the name of the data variable.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window