I want to mark the unread messages as bold inside my inbox,(I'm not using SMTP, They are just database records)
I have another field as "read" in the table to make it as read and unread,
How should one can make particular row bold depend on other field.
Image:
Refer Image
My code:
I have another field as "read" in the table to make it as read and unread,
How should one can make particular row bold depend on other field.
Image:
Refer Image
My code:
$(document).ready(
function
() {
var
keyvalue = window.document.URL.toString().split(
'?'
)[1];
var
dataSource =
new
kendo.data.DataSource({
transport: {
read: {
url:
"http://localhost:51565/GetMail.ashx?"
+ keyvalue +
"&action=select"
,
dataType:
"json"
},
destroy: {
url:
"http://localhost:51565/GetMail.ashx?"
+ keyvalue +
"&action=destroy"
,
dataType:
"json"
,
complete:
function
(jqXHR, textStatus) {
ds.read();
}
},
update: {
url:
"http://localhost:51565/GetMail.ashx?"
+ keyvalue +
"&action=update"
,
dataType:
"json"
},
parameterMap:
function
(options, operation) {
if
(operation !==
"read"
&& options.models) {
return
{ models: kendo.stringify(options.models) };
}
}
},
batch:
true
,
pageSize: 10,
schema: {
model: {
id:
"id"
,
fields: {
from: { type:
"string"
},
subject: { type:
"string"
},
body: { type:
"string"
},
time: { type:
"date"
}
}
}
}
});
$(
"#grid"
).kendoGrid({
dataSource: dataSource,
sortable:
true
,
pageable:
true
,
editable:
true
,
toolbar: [
"save"
],
columns: [
{ field:
"from"
, title:
"From"
, width: 150 },
{ field:
"subject"
, title:
"Subject"
, width: 150 },
{ field:
"body"
, title:
"Message"
, width: 250 },
{ field:
"time"
, title:
"Date"
, width: 80, template:
'#= kendo.toString(time,"MM/dd/yyyy") #'
},
{ command:
"destroy"
, title:
" "
, width: 110}]
});
});