The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Sorting by a foreign key field

Last post 10-26-2007, 12:34 PM by eakins05. 2 replies.
Sort Posts: Previous Next
  •  10-25-2007, 2:39 PM 6076

    Sorting by a foreign key field

    Scenario:  I have a TableA, TableB, and TableC.  TableB has foreign key references to TableA and TableC.  The collection I'm assigning to my esDataSource is a collection of TableB items, but the pertinent information is actually contained in TableA and TableB.  I can display this information no problem in my GridView by using Eval("UpToTableAByTableAID.fieldName").  My problem is that I need to be able to sort by these field names as if they were actual columns in TableB.  I've tried the extended properties as in this example: http://www.entityspaces.net/portal/Forums/tabid/105/forumid/60/tpage/1/view/topic/postid/895/Default.aspx.  Everything displays just fine, but apparently sorting isn't supported using this method.  Are there any other ways to do this, or is this a completely inconceivable, you-must-be-dreaming kind of an idea?  Thanks

  •  10-25-2007, 2:55 PM 6077 in reply to 6076

    Re: Sorting by a foreign key field

    Right now your best bet if you are only displaying data would be to create a view. There is another implementation of the DataSourceControl based control that supports hierarchical that we will be adding in the future.

    Regards,

    Scott Schecter
    EntitySpaces | My Site
  •  10-26-2007, 12:34 PM 6101 in reply to 6077

    Re: Sorting by a foreign key field

    ok thanks a lot
View as RSS news feed in XML