Skip to content

Commit 5c59cc3

Browse files
committed
Merge pull request #125 from martimarkov/patch-1
Add option to use custom DOM
2 parents 5b81a3b + 812aeae commit 5c59cc3

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

Mvc.JQuery.Datatables/DataTableConfigVm.cs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,28 @@ public JToken SearchCols
7979

8080

8181

82+
private string _dom;
83+
8284
public string Dom
8385
{
84-
get {
85-
var sdom = "";
86-
if (ColVis) sdom += "C";
87-
if (TableTools) sdom += "T<\"clear\">";
88-
if (ShowPageSizes) sdom += "l";
89-
if (ShowSearch) sdom += "f";
90-
sdom += "tipr";
91-
return sdom;
86+
get
87+
{
88+
if (!string.IsNullOrEmpty(_dom))
89+
return _dom;
90+
91+
string str = "";
92+
if (this.ColVis)
93+
str += "C";
94+
if (this.TableTools)
95+
str += "T<\"clear\">";
96+
if (this.ShowPageSizes)
97+
str += "l";
98+
if (this.ShowSearch)
99+
str += "f";
100+
return str + "tipr";
92101
}
102+
103+
set { _dom = value; }
93104
}
94105

95106
public bool ColVis { get; set; }

0 commit comments

Comments
 (0)