I am trying to implement a Kendo progress bar in the HTML table. So, far I am able to render the progress bar inside the table cell but I am unable to bind it to the model attribute called "Percentage". I am using item.Percentage in the value field but, unable to bind it to the progress bar for a change in the display according to the percent value.
Relevant part of the HTML table cell:
<td align="center">
@*<div id="profileCompleteness"></div>*@
<div class='progress'></div>
@Html.DisplayFor(modelItem => item.Percentage)
</td>
Javascript:
<script>
$(".progress").each(function(){
var row = $(this).closest("tr");
var model = grid.dataItem(row);
$(this).kendoProgressBar({
value: item.Percentage,
min:0,
max: 1100,
type:"chunk"
});
});
</script>
Model
public class MainScreenViewModel
{
private IMainScreenRepository mainScreenRepository;
#region Properties
[Required]
public decimal ReportId { get; set; }
public string ReportDescription { get; set; }
public string Status { get; set; }
public string Percentage { get; set; }
}
Please point me in the right direction. I don't know how to bind the percent value attribute to the Progressbar to display the value dynamically.