when a user changes the value in a text box, it is validated and if it fails validation, I want to border the text box with red and show a tooltip that does not go away until the user changes the value
Here's the change event code:
Thanks,
--Ed
Here's the change event code:
$(document).on("change", "input.Percentage", function () { var grid = $("#grid-pct").data("kendoGrid"); var row = $(this).closest('tr'); var dataItem = grid.dataItem(row); var rawVal = $(this).val(); if (rawVal >= 0 && rawVal <= 100) { var data = { Id: dataItem.id, Percentage: rawVal, Username: dataItem.Username, UpdateDate: dataItem.UpdateDate }; } else { $(this).kendoTooltip({ autoHide: false, content: 'value can only be between 0 and 100' }); $(this).css('border-color', '#f00'); }});Thanks,
--Ed