1
Answer

Display working if not clock out.

Dinesh Kumar

Dinesh Kumar

7y
191
1
hello i am using Kendo Grid for display time duration. if am in clock-In at that time should be display "Working" in Duration column after clock-Out should be display total log time in Duration column.
 
how can i Solve this problem Can you help me.
 
This is my kendo Code.
 ----------------------------------------------------------------------------
 columns.Bound(c => c.Duration).Groupable(false).Filterable(false)
.ClientGroupFooterTemplate("#= time.minutesToTime(data.DurationInMinutes.sum) # ")
.ClientFooterTemplate("#= time.minutesToTime(data.DurationInMinutes.sum) # ")
.ClientTemplate("#=typeof Duration!='undefined'?formatDuration(Duration.Hours,Duration.Minutes):0#").HtmlAttributes(new { @class = "" });
 
I kept one Image example in bellow. 
 
Answers (1)
0
Rupesh Kahane

Rupesh Kahane

NA 10.6k 866.7k 7y
Write databound function
  1.  @(Html.Kendo().Grid<BatchDetails>()  
  2.       .Name("Grid")                         
  3. .Events(x => x.DataBound("onDataGridBound"))                 
  4.   )  
in that javascript function write your logic (i.e. if time is out of clock then skip that row / hide that row) 
  1. $function({  
  2.  var grid = $("#Grid").data("kendoGrid");  
  3.  grid.bind("dataBound", function(){  
  4.   //dosomething here using for loop  
  5.  });  
  6. })