-
-
Notifications
You must be signed in to change notification settings - Fork 15
4. Column Settings
Emrah KONDUR edited this page Dec 17, 2022
·
8 revisions
Set column header. Default is property name.
.Title("Person Name");
Or use DisplayAttribute
for properties.
[Display(Name = "Person Name")]
public string Name { get; set; }
Customize datetime format with Moment.js expression.
.Format("DD-MMM-Y");
Or use DisplayFormatAttribute
for properties.
[DisplayFormat(DataFormatString = "DD-MMM-Y")]
public DateTime? BirthDate { get; set; }
Manipulate and change display of column according to data.
.Template("(data === true) ? '<span class=\"glyphicon glyphicon-ok\"></span>' : '<span class=\"glyphicon glyphicon-remove\"></span>'");
Set column visible or hidden, default is true
.
.Visible(false);
Set column searchable or not, default is true
.
.Searchable(false);
Set column orderable or not, default is true
.
.Orderable(false);
Set column width percentage.
.Width(50);
Set css class of column.
.Class("text-danger");
Set default value for null data.
.DefaultContent("No Data");