Sorting asp.net mvc 4枚举数据类型列的webgrid排序问题
在MVC4 Web网格中, Iam从服务器端绑定Web网格以实现高效分页和排序。 除一列外,所有列的排序都可以正常工作,即列的数据类型为ENUM 我尝试过使用grid.bind()示例,这些示例存在于该站点中,但不起作用。Sorting asp.net mvc 4枚举数据类型列的webgrid排序问题,sorting,asp.net-mvc-4,enums,webgrid,Sorting,Asp.net Mvc 4,Enums,Webgrid,在MVC4 Web网格中, Iam从服务器端绑定Web网格以实现高效分页和排序。 除一列外,所有列的排序都可以正常工作,即列的数据类型为ENUM 我尝试过使用grid.bind()示例,这些示例存在于该站点中,但不起作用。 请帮助我我也遇到了同样的问题-它无法对枚举进行排序。因此,当我将.ToString()添加到列表中时,我只是在我的枚举上调用了它: private void CreateReport(int id, string name, Report
请帮助我我也遇到了同样的问题-它无法对枚举进行排序。因此,当我将.ToString()添加到列表中时,我只是在我的枚举上调用了它:
private void CreateReport(int id, string name,
ReportType type, Relationshiplevel level, string date, string createdby,
string filetype, double filesize)
{
var newReport=new Report
{
Id = id,
Name = name,
Reporttype = type.ToString(),
Relationshiplevel = level.ToString(),
CreatedDate = DateTime.Parse(date),
CreatedBy = createdby,
FileType = filetype,
FileSize = filesize
};
_reports.Add(newReport);
}
现在可以正常工作了enum数据类型列的webgrid排序问题