search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

DataTextField string from another table

Asked by Cezar
7 years ago.

Is it possible to get string data using Entity Framework with virtual field?
I mean e.g model looks like

int ID
string Event
DateTime Start
DateTime End
int PO_ID (foreign key)
virtual PaintballOption PaintballOption

and normally I can get Name field from PaintballOption by just writting PaintballOption.Name, so how can I get such string and put it into DataTextField?

Answer posted by Dan Letecky [DayPilot]
7 years ago.

At this moment it can only read direct properties - you'll have to create an alias:

public string PaintballName {
  get {
    return PaintballOption.Name;
  }
}
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.