I have a list of Countries in my Grid, a country has a Code, that is unique. The Grid is in EditCell mode.
I need to perform a check, if newly inserted Country Code is Unique.
So, on the controller I have
[AcceptVerbs("GET", "POST")]
public IActionResult KeyExist(string key)
{
if (_countryService.CodeExists(key))
{
return Json($"The Code '{key}' is already used, please try another one!");
}
return Json(true);
}
how should I bind the KeyExist method to the grid's validation?
for the initial procedure, see here, but for me that does not work, a fix should be applied to that code, see here