I have a kendo grid.And i want to add inline editing validation there.
Below is the screen shot of my kendo grid:
According to my functionality i want to validate the "Media" filed according to "Media Type" field.
We have 4 Media Types(Email,WebURL,Facebook,Twitter).
And the Media field string should be according to selected Media Type.For example:
1) For Email Media Type : amit@gmail.com
2) For WebURL Media Type: www.yahoo.com
And if someone entered invalid Media string according to selected Media Type then i want to show validation message.It can be MVC model validation or Javascript validation.
I have tried with two know ways.But none of helping me.
1) The client template.
In which i have used client template for Add Net Item button to validate the Media field.And for that i have handle it by Javascript function.Please have a look below :-
.ToolBar(commands => { commands.Template("Add New Media"); })
By this i was able to validate the field.But was unable to save it in database.Means i don't know the way to call Saving method by this.
2) By Commands:-
I have tried this also :-
.ToolBar(commands =>
{
commands.Create();
commands.Save();
})
But it was not validating the field.But i was able to save it in database.