Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
903
How to display two differents string in two cols of a web combo ? (strings held in differents childobject of a single parent object given as dataSource to the combo)
posted
I have a object SystemUser composed of 2 User objects
My user object is composed of a name and a first name

Consider the following schema :

SystemUser
- User user
- - Name
- - FirstName
- User userManager
- - Name
- - FirstName


I want to display Both SystemUser's users' names inside the WebCombo control.
In fact I want user.Name in one column and userManager.Name in a second column


I created a webcombo on an ASPX form.
I set as a datasource a List<SystemUser>
I created two columns via Edit Data Structure window

Column 1 : Key "username" baseColumnName = "user.Name"
Column 2 : Key "usermanagername" baseColumnName = "userManager.Name"


but this doesn't work.
How can I display two differents strings that are on the same base object but located in different child objects ?

If I put two string properties, this is working but I can't keep the property in my parent object, so i need the webcombo control to be able to retrieve info directly from the complex data type hosted as a child object in my SystemUser object !

Please advice!