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
35
Binding to Sub Objects
posted

When setting a DataSource to an array of object and there sub objects within the object, how do you access the DataFieldName?  I have tried:

DataFieldName="Customer.CompanyName"

but that does not seem to work and I can't find any example of this, so is this even supported?

 

Parents
No Data
Reply
  • 150
    Suggested Answer
    posted

    Hello kmarkle,

    The easiest way to do this is to create wrapper for the data you want in the grid and then create List<MyDataWrapperClass>. Then bind the grid to it.

    Hope that helps.

    Christo Djambov

Children
No Data