I received the following error when user tried to perform sorting on certain columns that are referencing extended properties from partial class. Sys.WebForms.PageRequestManagerServerErrorException: Cannot find column ColumnName.
I am using partial class to extend classes generated by ORM. I have something similar to below:
Sorting will work on Id and FirstName columns. And will throw exception on CreatedOn and Gender properties. The thing I don't understand is that they are displayed properly but just not on the sorting.
Any ideas? Thanks in advance.
I am using partial class to extend classes generated by ORM. I have something similar to below:
public partial class Person //generated by ORM |
{ |
public int Id {get;set;} |
public string FirstName {get;set} |
} |
public partial class Person //hand written |
{ |
public DateTime CreatedOn {get;set;} |
public Gender Gender {get;set;} |
} |
public enum Gender |
{ |
Male = 1, |
Female = 2 |
} |
Sorting will work on Id and FirstName columns. And will throw exception on CreatedOn and Gender properties. The thing I don't understand is that they are displayed properly but just not on the sorting.
Any ideas? Thanks in advance.