Error when sorting on bound complex type RRS feed

  • Question

  • I have a data grid with a column bound to "Author.LastFirstName" where "Author" is a navigational property and "LastFirstName" is a complex type. This displays because I have ToString overridden in "LastFirstName". But the gird wouldn't let me sort until I implemented IComparable. But when I try to sort the column I get error:

    DbSortClause expressions must have a type that is order comparable

    Doesn't IComparable make my complex type order comparable?

    When I used a string property in Author, it works fine. Shouldn't complex type with IComparable work too?

    Thursday, September 29, 2011 6:34 AM


All replies