-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy pathUserTableRowViewModel.cs
45 lines (32 loc) · 1.39 KB
/
UserTableRowViewModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using Mvc.JQuery.DataTables.Example.App_GlobalResources;
using Mvc.JQuery.DataTables.Example.Domain;
using Mvc.JQuery.DataTables.Models;
using System;
namespace Mvc.JQuery.DataTables.Example.Controllers
{
public class UserTableRowViewModel
{
[DataTables(DisplayName = "Name", DisplayNameResourceType = typeof(UserViewResource), MRenderFunction = "encloseInEmTag")]
public string Name { get; set; }
[DataTables(SortDirection = SortDirection.Ascending, Order = 0)]
public int Id { get; set; }
[DataTables(DisplayName = "E-Mail", Searchable = true)]
public string Email { get; set; }
[DataTables( Sortable = false, Width = "70px")]
public bool IsAdmin { get; set; }
[DataTables(Visible = false)]
public bool AHiddenColumn { get; set; }
[DataTables(Visible = false)]
public decimal Salary { get; set; }
public string Position { get; set; }
[DataTablesFilter(DataTablesFilterType.DateTimeRange)]
[DefaultToStartOf2014]
public DateTime? Hired { get; set; }
public Numbers Number { get; set; }
[DataTablesExclude]
public string ThisColumnIsExcluded { get { return "asdf"; } }
[DataTables(Sortable = false, Searchable = false)]
[DataTablesFilter(DataTablesFilterType.None)]
public string Thumb { get; set; }
}
}