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) {
- debugger;
- var status = $(assignedToMeByMeColl).attr('data-STATUS');
- 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 }
- ,
- ]
- });