Hi,
I am new to Kendo and I am facing a very confusing problem that i cant solve.
I have a grid which contains 5 columns like so - RoleName, Description, isActive, isDeleted, Action.
Now i have validation just on the RoleName Column.
My issue is, I should not let the user Input duplicate RoleName on edit or on creating a new record. For example, RoleName = Admin already exists on the grid and when the user creates a new record he shouldn't be able to enter Admin again, i got this part to work however when the user edits the already existing row which contains "Admin" as the rolename and changes isActive, the validation fires again telling Admin already exists and i cant edit that row. How do i fix this?
fields: {
Id: { type: "number", editable: false },
RoleName: {
type: "string",
validation: {
required: true,
validateOnBlur: false,
rolenameValidation: function (input) {
if (input.is("[name='RoleName']") && input.val() !== "" && NetAppAssetRecoveryRoleAdminMethods.IfRoleNameExists(input.val())) {
input.attr("data-rolenameValidation-msg", "Role Name already exists");
return false;
}
else if (NetAppAssetRecoveryRoleAdminMethods.IfRoleNameExists(input.val()) == undefined)
{
input.attr("data-rolenameValidation-msg", "Role Name can contain only characters");
return false;
}
return true;
}
}
},.....
...............
...............