You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
///This view model class has been referred from example created by Marien Monnier at Soft.it. All credits to Marien for this class
7
+
5
8
/// <summary>
6
9
/// A full result, as understood by jQuery DataTables.
7
10
/// </summary>
8
11
/// <typeparam name="T">The data type of each row.</typeparam>
9
-
publicclassDTResult<T>
12
+
publicclassDtResult<T>
10
13
{
11
14
/// <summary>
12
15
/// The draw counter that this object is a response to - from the draw parameter sent as part of the data request.
13
16
/// Note that it is strongly recommended for security reasons that you cast this parameter to an integer, rather than simply echoing back to the client what it sent in the draw parameter, in order to prevent Cross Site Scripting (XSS) attacks.
14
17
/// </summary>
15
-
publicintdraw{get;set;}
18
+
[JsonProperty("draw")]
19
+
publicintDraw{get;set;}
16
20
17
21
/// <summary>
18
22
/// Total records, before filtering (i.e. the total number of records in the database)
19
23
/// </summary>
20
-
publicintrecordsTotal{get;set;}
24
+
[JsonProperty("recordsTotal")]
25
+
publicintRecordsTotal{get;set;}
21
26
22
27
/// <summary>
23
28
/// Total records, after filtering (i.e. the total number of records after filtering has been applied - not just the number of records being returned for this page of data).
24
29
/// </summary>
25
-
publicintrecordsFiltered{get;set;}
30
+
[JsonProperty("recordsFiltered")]
31
+
publicintRecordsFiltered{get;set;}
26
32
27
33
/// <summary>
28
34
/// The data to be displayed in the table.
29
35
/// This is an array of data source objects, one for each row, which will be used by DataTables.
30
36
/// Note that this parameter's name can be changed using the ajaxDT option's dataSrc property.
31
37
/// </summary>
32
-
publicIEnumerable<T>data{get;set;}
38
+
[JsonProperty("data")]
39
+
publicIEnumerable<T>Data{get;set;}
40
+
41
+
publicstringPartialView{get;set;}
33
42
}
34
43
35
44
/// <summary>
36
45
/// The additional columns that you can send to jQuery DataTables for automatic processing.
37
46
/// </summary>
38
-
publicabstractclassDTRow
47
+
publicabstractclassDtRow
39
48
{
40
49
/// <summary>
41
50
/// Set the ID property of the dt-tag tr node to this value
42
51
/// </summary>
43
-
publicvirtualstringDT_RowId=>null;
52
+
[JsonProperty("DT_RowId")]
53
+
publicvirtualstringDtRowId=>null;
44
54
45
55
/// <summary>
46
56
/// Add this class to the dt-tag tr node
47
57
/// </summary>
48
-
publicvirtualstringDT_RowClass=>null;
58
+
[JsonProperty("DT_RowClass")]
59
+
publicvirtualstringDtRowClass=>null;
49
60
50
61
/// <summary>
51
62
/// Add this data property to the row's dt-tag tr node allowing abstract data to be added to the node, using the HTML5 data-* attributes.
52
63
/// This uses the jQuery data() method to set the data, which can also then be used for later retrieval (for example on a click event).
53
64
/// </summary>
54
-
publicvirtualobjectDT_RowData=>null;
65
+
[JsonProperty("DT_RowData")]
66
+
publicvirtualobjectDtRowData=>null;
55
67
}
56
68
57
69
/// <summary>
58
70
/// The parameters sent by jQuery DataTables in AJAX queries.
59
71
/// </summary>
60
-
publicclassDTParameters
72
+
publicclassDtParameters
61
73
{
62
74
/// <summary>
63
75
/// Draw counter.
@@ -69,12 +81,12 @@ public class DTParameters
69
81
/// <summary>
70
82
/// An array defining all columns in the table.
71
83
/// </summary>
72
-
publicDTColumn[]Columns{get;set;}
84
+
publicDtColumn[]Columns{get;set;}
73
85
74
86
/// <summary>
75
87
/// An array defining how many columns are being ordering upon - i.e. if the array length is 1, then a single column sort is being performed, otherwise a multi-column sort is being performed.
76
88
/// </summary>
77
-
publicDTOrder[]Order{get;set;}
89
+
publicDtOrder[]Order{get;set;}
78
90
79
91
/// <summary>
80
92
/// Paging first record indicator.
@@ -92,14 +104,14 @@ public class DTParameters
92
104
/// <summary>
93
105
/// Global search value. To be applied to all columns which have searchable as true.
94
106
/// </summary>
95
-
publicDTSearchSearch{get;set;}
107
+
publicDtSearchSearch{get;set;}
96
108
97
109
/// <summary>
98
110
/// Custom column that is used to further sort on the first Order column.
0 commit comments