-
Notifications
You must be signed in to change notification settings - Fork 134
/
GridRenderOptions.cs
74 lines (61 loc) · 2.01 KB
/
GridRenderOptions.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
namespace GridCore
{
public class GridRenderOptions
{
public const string DefaultPartialViewName = "_Grid";
public GridRenderOptions(string gridName, string viewName)
{
ViewName = viewName;
GridName = gridName;
Selectable = false;
AllowMultipleFilters = false;
Striped = false;
}
public GridRenderOptions()
: this(string.Empty, DefaultPartialViewName)
{
}
/// <summary>
/// Specify partial view name for render grid
/// </summary>
public string ViewName { get; set; }
/// <summary>
/// Is multiple filters allowed
/// </summary>
public bool AllowMultipleFilters { get; set; }
/// <summary>
/// Gets or set grid items selectable
/// </summary>
public bool Selectable { get; set; }
/// <summary>
/// Specify grid Id on the client side
/// </summary>
public string GridName { get; set; }
/// <summary>
/// Specify to render grid body only
/// </summary>
public bool RenderRowsOnly { get; set; }
/// <summary>
/// Does items count need to show
/// - Author Jeeva J
/// </summary>
public bool ShowGridItemsCount { get; set; }
/// <summary>
/// To show string while show grid items count
/// - Author Jeeva J
/// </summary>
public string GridCountDisplayName { get; set; }
/// <summary>
/// Get value for striped grid
/// </summary>
public bool Striped { get; set; }
public static GridRenderOptions Create(string gridName)
{
return new GridRenderOptions(gridName, DefaultPartialViewName);
}
public static GridRenderOptions Create(string gridName, string viewName)
{
return new GridRenderOptions(gridName, viewName);
}
}
}