I have a List<Role>
(see below) that I am binding to an asp.net gridview. I want to sort this data using SortExpression
, such that it is sorted by two properties of sub-objects of the rows. Specifically, I want to sort by the Application
's Name
, then the ApplicationType
's ApplicationTypeName
.
How can I do this?
The classes here are:
public class Application
{
public string Name {get; set;}
public int Status {get; set;}
}
public class ApplicationType
{
public string ApplicationTypeName {get; set;}
public int ApplicationTypeStatus {get; set;}
}
public class Role
{
public Application oApplication {get; set;}
public ApplicationType oApplicationType {get; set;}
}