I'd like to link a nested class as datasource in the Manual Define a Schema functionality.
My class structure is:
Public class Control Public Property Key() As String End Property Public Property Name() As String End Property Public Property Translation() As CTranslation End Propertyend class
Public class Translation Public Property Code() As String End Property Public Property Languages() As List (of Language) End Property Public Property TranslationId() As Integer End Propertyend class
Public class Language Public Property ControlToolTip() As String End Property Public Property LanguageId() As Integer End Property Public Property Text() As String End Propertyend class
I'd like the grid to look like:
Databand ColumnsControl -key -Name -Code -TranslationId -Clanguage -ControlToolTip -LanguageId -Text
Is this possible? If not how to do this by code?
Thnx in Advance!
Hi,
I'm not sure I understand what you are asking.
It looks like what you want is for the grid to display the Languages list directly under the Control without displaying the Translatios in between.
You can certainly display this in the grid, but you will need a DataSource that returns the data in the same structure. If you bind the grid to a DataSource with three levels, then the grid will display all three levels, and you cannot hide the second level without also hiding the third.
So you could build an UltraDataSource component that has the structure you want the grid to display and then use that UltraDataSource as a sort've intermediary between your business objects and the grid.
You then have to decide whether you want to simply copy the business object data into the UltraDataSource all at once up front or use the load-on-demand functionality to retrieve the data from your business objects as needed.
You understood my question correctly. Is there an example how such datasource can be designed?
I don't see how you'll define the code/id of Translation in the datasource on the level of Control.Or how you'll define Languages as the first child band. The SDK included examples don't go that far. Does it work on the namespace in the Key value? Or on the namespace of the DataType? Or do I programmatorically assign the property of the object to the column at runtime in some sort of way?
thnx.