locked
Is there a way to specify the foreign key column in the parent table for a autogenerated filter? RRS feed

  • Question

  • User-1169605399 posted

    Is there a way to specify the foreign key column in the parent table for a autogenerated filter?

    Suppose I have a table "School" with a typical row like this
    ID: 23
    Name: Roosevelt
    FullName: Roosevelt Junior High

    and another table Student
    Id: 97
    Name: Joe Walker
    SchoolId: 23

    When doing the Autogenerate filter - true on the Student metadata like so:
    public class StudentMetadata
    {
    . etcetera

    [Required]
    [UIHint("ForeignKey")]
    [Display(Name = "School", AutoGenerateFilter = true)]
    public object School { get; set; }

    . etcetera
    }

    On the Student List page, I don't want the drop down menu for the foreign key filter School to show the Name ("Roosevelt") but rather the FullName ("Roosevelt Junior High")
    Is this possible? How?

    Tuesday, April 10, 2012 1:03 PM

Answers

All replies