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
400
Columns bound to parent entities
posted

Hi!

I have an ultragrid with one band, bound to a list of Entity Framework entities. Lets say its bound to a list of Customer entities. Customer has a property called Country of type Country (just another Entity Framework entity). I want to display in my ultragrid a column with the name of the Country, without creating a view of my data (in database or EF level). To put it differently, I want to bound an ultragrid column to Customer.Country.Name property.

Is this possible?

Parents
No Data
Reply
  • 45049
    Verified Answer
    posted

    If you don't want to create a view of your data, then you need to use an unbound column in this scenario.  You can use the InitializeRow event to set the value from the data source to the grid.  You'll need to also use other events (such as AfterRowUpdate) to process any updates from the grid back to the data source.

Children
No Data