Thread View: borland.public.csharpbuilder.winforms.controls.using
1 messages
1 total messages
Started by Terentius Neo
Wed, 31 Aug 2005 16:27
Binding DataGrid to an hierarchy of objects - problem with Styles at the bottom of the hierarchy
Author: Terentius Neo
Date: Wed, 31 Aug 2005 16:27
Date: Wed, 31 Aug 2005 16:27
22 lines
1978 bytes
1978 bytes
I have a DataGrid binded to a custom hierarchy. It is an ArrayList of
objects. Each object has a public property returning a new ArrayList of
sublevel objects (which may again have sublevels of their own). All the
objects are of the same base type.
Everything works fine until there are no objects at the lower level.
Despite this the link to the sublevel is still shown in the DataGrid.
Clicking it gives the following error message ("Caption" is a public
property of linked to a DataGridColumStyle):
"The project encountered unhandled exception class
System.InvalidOperationException with message
'The 'Caption' DataGridColumnStyle cannot be used because it is not
associated with a Property or Column in the Datasource"
If I remove the DataGridColumnStyles this does not happen. Also the link
to the lower level is not shown in the DataGrid unless there really are
objects at that level.
Could somebody give a hint how to fix this?
Terentius
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads