Basically here I am finding the difficulty to update the row as i am storing unique values to update i can able to get the id during edit but during update not able to update
could you please help me in this?
var _nextId = 1;
// ID of Product currently editing
var _activeId = 0;
var values = [];
var maxValue = 0;
var _row = null;
function TutorCourseUpdate() {
if ($("#updateButton").text() == "Update") {
TutorCourseUpdateInTable(_activeId);
}
else {
TutorCourseAddToTable();
}
// Clear form fields
resetfields();
}
function TutorCourseUpdateInTable(id) {
// Find TutorCourse in <table>
var row = $("#tbl_TutorcoursList.find('.btnedit').[data-id='" + id + "']");
// Add changed Tutorcourse to table
$(row).after(TutorCourseTableRow(id));
// Remove original TutorCourse
$(row).remove();
$("#updateButton").text("Add");
resetfields();
}