TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Test
NA
58
51k
How to get the value from the attribute use jquery
Sep 22 2019 8:01 AM
I have a kendogrid where i am binding the data to ui using bind function i need to get the value from the returning result which i am unable to pull using $(assignedToMeByMeColl).attr('data-STATUS'); how can i get the value
What i tried
var status = $(assignedToMeByMeColl).attr('data-STATUS');
Code- Below is my kendo grid binding code i am getting the dataset result sets and from that result sets i need to get the status which will be either completed or pending
$(
'#grid'
).kendoGrid({
scrollable:
true
,
resizable:
true
,
pageable:
true
,
reorderable:
true
,
sortable: {
mode:
"single"
,
allowUnsort:
false
},
pageable: {
refresh:
true
,
pageSizes: [25, 50],
change:
function
(e) {
if
(ACurrentPage != $(
"#grid"
).data(
"kendoGrid"
).dataSource.page()) {
ACurrentPage = $(
"#grid"
).data(
"kendoGrid"
).dataSource.page();
SearchActivity(currentTab);
}
}
},
dataBound: onGridDataBound,
dataSource: {
data: assignedToMeByMeColl, pageSize: ACurrentPageSize
, page: ACurrentPage,
sort: {
field: ACurrentSortField,
dir: ACurrentSortDirection,
change:
function
(e) {
}
},
serverSorting:
true
,
serverPaging:
true
,
schema: {
total:
function
(assignedToMeByMeColl) {
//HERE I AM GETTING TWO RESULT SETS I NEED TO GET THE VALUE FOR STATUS FROM THAT RESULT SET
debugger
;
var
status = $(assignedToMeByMeColl).attr(
'data-STATUS'
);
//TRIED THIS BUT GETTING UNDEFINED
return
assignedToMeByMeColl[0].Count;
}
}
},
columns: [
{ title:
"Number"
, field:
"ID"
, template:
"<a class='anchorNavLinkStyle' href='javascript:void(0)' data-ID='#= ID#' onclick='RedirectToID(this)'>#=ID#</a>"
, width: 130 },
{
field:
"FROM"
,
title:
"FROM"
,
width: 100
}, {
field:
"By"
,
title:
"By"
,
width: 120
}, {
field:
"To"
,
title:
"To"
,
width: 120
}
, {
field:
"ID"
,
title:
"ID"
,
width: 100
}
, {
field:
"TYPE"
,
title:
"Type"
,
width: 130
},
{ title:
"Status"
, template:
"<i class='fa fa-thumbs-up' data-ID='#=ID#' onclick='RedirectActivity(this)' title='Perform'></i>"
, width: 100 }
,
]
});
Reply
Answers (
1
)
Button dot show not working?
Value set and Get ?