I had a few minutes to spare so I though why not give some more info ? I double checked the differences between the code changes. Here is a synposis.
Web.Mvc\Startup\Startup.cs
using Newtonsoft.Json.Serialization
.......
//MVC
services.AddMvc(options =>
{
options.EnableEndpointRouting = false;
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
}).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddMvc().AddJsonOptions(options =>
options.SerializerSettings.ContractResolver = new DefaultContractResolver());
services.AddKendo();
Web.Mvc\Areas\App\Views_ViewImports.cshtml
.......
@addTagHelper *, Kendo.Mvc
@using Kendo.Mvc.UI
Web.Mvc\Areas\App\Views\Layout\Default\Layout.cshtml (Other layout files were updated as well)
@section Styles{
......
<link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.common-nova.min.css" />
<link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.nova.min.css" />
.......
}
@section Scripts{
.......
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/kendo-ui/js/kendo.all.min.js"></script>
<script src="~/lib/kendo-ui/js/kendo.aspnetmvc.min.js"></script>
.......
}
I understand your pain @dev_frontrush it was a pain in the arse to get it all working. I suspect the issue isn't the framework version but something you missed.
Go back through my list and re-check everything, if you missed some parts you will either get the error like you described or the control won't render. Sorry that I can't give you more feedback but I came to a working solution via trial and error. Also it was for the Demo project.
Sadly I think we are dropping Telerik since some of the advice we have been given was that Telerik can be a major hassle to implement.
Again thanks for the awesome support, sadly I'm lacking knowledge with of JQuery and the JQuery validator. The documentation is a bit hard to follow sometimes.
The key item was onfocusout which was the reason why hitting the enter key on a element was causing the modal validation form to appear. Sadly I tried lots of things and I could get the animate method to work.
So if anyone else wants a quick and dirty solution to a muti-page modal form then this is your answer. Works quite well and will handle user pressing Enter on elements or clicking the Save button at the bottom of the modal form.
this.init = function (modalManager) {
......
_$employeeInformationForm.validate({
onfocusout: false,
invalidHandler: function (form, validator) {
if (!validator.numberOfInvalids()) return;
$(validator.errorList[0].element).focus();
}
});
Not sure if this is any use to anyone else but I might as well post it here, if it helps one person then it was worth my time.
Important the links below are the reference documents supplied by Telerik. You MUST read and understand these before continuing. Some of the steps required are NOT covered in this guide. This guide is mainly to explain what is needed to get the Telerik datepicker control working with a _CreateOrEditModal.cshtml modal form
https://docs.telerik.com/kendo-ui/intro/installation/getting-started#download https://docs.telerik.com/devtools/aspnet-ajax/installation/installing-the-telerik-controls-from-nuget-package https://docs.telerik.com/aspnet-mvc/getting-started/nuget-install#set-up-nuget-package-source https://docs.telerik.com/aspnet-core/getting-started/getting-started https://docs.telerik.com/aspnet-core/getting-started/getting-started-copy-client-resources#manual-installation
Please refer to https://docs.telerik.com/aspnet-core/getting-started/getting-started
using Newtonsoft.Json.Serialization;
public IServiceProvider ConfigureServices(IServiceCollection services)
{
//MVC
services.AddMvc(options =>
{
options.EnableEndpointRouting = false;
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
}).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddMvc().AddJsonOptions(options =>
options.SerializerSettings.ContractResolver = new DefaultContractResolver());
services.AddKendo();
@addTagHelper *, Kendo.Mvc
@using Kendo.Mvc.UI
..Web.Mvc\wwwroot\lib\kendo-ui\js
..Web.Mvc\wwwroot\lib\kendo-ui\styles
@section Styles{
…
<link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.common-nova.min.css" />
<link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.nova.min.css" />
@RenderSection("Styles", false)
}
Note jquery MUST be before the other scripts
@section Scripts{
<script abp-src="/metronic/src/js/demo/default/base/layout.js" asp-append-version="true"></script>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/kendo-ui/js/kendo.all.min.js"></script>
<script src="~/lib/kendo-ui/js/kendo.aspnetmvc.min.js"></script>
@RenderSection("Scripts", false)
}
7. Finally add the actual Kendo datepicker to your page
@(Html.Kendo().DatePicker()
.Name("dob")
.Value(Model.Person.DOB)
)
If the control doesn't render at all check the client-side assets as well as the stylesheet and scripts in _Layout.cshtml page
If you get something like **IHtmlHelper<CreateOrEditCatModalViewModel>' does not contain a definition for 'Kendo' ** check to make sure you have updated the correct _ViewImports.cshtml page. You don't need to register another dll or anything like that contrary to what you find elsewhere.
Again thanks for the keyword @maliming ! You guys are awesome so glad we bought this framework !
I will do some more research, keep in mind my knowledge is limited in some regards. On the plus side we are getting in a part time contractor to assist us with the more complicated problems.
To get a custom HTML Title to any index page I need to add RenderSection("Title", true)
to the _Layout.cshtml
pages. And then Title
to the Index.cshtml
pages.
If I don't add RenderSection("Title", true)
to the _Layout.cshtml
page it give me nice exception error.
We got all the pages loading except the Theme8 _Layout.cshtml
page is a LOT different to the others and we can't work out where to add RenderSection("Title", true)
So my question is either where do we add the RenderSection("Title", true)
to the Theme8 _Layout.cshtml
page, OR are we doing something we shouldn't and the framework handles custom titles and we just need to update the framework code ?
Thanks again for the awesome support. I saw the Layout.cshtml page but wasn't sure it was the one to edit since there were heaps of them. Still struggling with getting the Telerik controls to actually work. Still waiting for an answer from their support people.
Thanks for getting back to me @ismcagdas I suspect I have done something wrong. My files are in the wrong place and I rolled back all the changes I made since it was playing havok with the build and publish.
It is is OK with you I will close this ticket and get back to you at a later date if I still have problems.
bundleconfig.json
https://docs.google.com/document/d/1xrWsuaD4G9Gv45E0NJlBrfm49Z8Zhpnb5WHDMP9HcFc/edit?usp=sharing
package.json
{
"name": "abpzerotemplate",
"scripts": {
"bundle": "dotnet bundle",
"bundle-clean": "dotnet bundle clean",
"bundle-watch": "dotnet bundle watch",
"restore": "dotnet restore",
"copy-node-modules": "gulp copy:node_modules",
"package-install": "yarn",
"bundle-clean:bundle": "npm run bundle-clean && npm run bundle",
"create-bundles": "gulp copy:node_modules && npm run bundle-clean:bundle",
"package-install-create-bundles": "npm run package-install && npm run create-bundles",
"full-build": "npm run restore && npm run package-install-create-bundles"
},
"version": "6.4.0",
"dependencies": {
"@aspnet/signalr": "^1.0.4",
"@fancyapps/fancybox": "^3.5.2",
"abp-web-resources": "^3.8.4",
"animate.css": "^3.7.0",
"autosize": "^4.0.2",
"block-ui": "^2.70.1",
"blueimp-file-upload": "^9.27.0",
"bootstrap": "^4.1.3",
"bootstrap-daterangepicker": "^3.0.3",
"bootstrap-hover-dropdown": "^2.2.1",
"bootstrap-markdown": "^2.10.0",
"bootstrap-maxlength": "^1.6.0",
"bootstrap-notify": "^3.1.3",
"bootstrap-select": "^1.13.3",
"bootstrap-switch": "^3.3.4",
"bootstrap-timepicker": "^0.5.2",
"bootstrap-touchspin": "^4.2.5",
"bootstrap4-datetimepicker": "^5.2.3",
"bower": "*",
"chart.js": "^2.7.3",
"chartist": "^0.11.0",
"cookieconsent": "^3.1.0",
"css-toggle-switch": "^4.1.0",
"d3": "^5.7.0",
"datatables.net": "^2.1.1",
"datatables.net-bs4": "^3.2.2",
"datatables.net-responsive": "^2.2.3",
"datatables.net-responsive-bs4": "^2.2.3",
"datatables.net-select": "^1.2.7",
"detect-zoom": "^1.0.2",
"dropzone": "^5.5.1",
"easy-pie-chart": "^2.1.7",
"famfamfam-flags": "^1.0.0",
"flot": "^0.8.0-alpha",
"gmaps": "^0.4.24",
"inputmask": "^4.0.3",
"ion-rangeslider": "^2.2.0",
"jquery": "^3.3.1",
"jquery-form": "^4.2.2",
"jquery-serializejson": "^2.8.1",
"jquery-slimscroll": "^1.3.8",
"jquery-ui": "^1.12.1",
"jquery-sparkline": "^2.4.0",
"jquery-validation": "^1.19.0",
"jquery.counterup": "^2.1.0",
"jquery.uniform": "^4.2.2",
"jqvmap": "^1.5.1",
"js-cookie": "^2.2.0",
"js-url": "^2.3.0",
"json2": "*",
"jstree": "^3.3.7",
"localforage": "^1.7.3",
"malihu-custom-scrollbar-plugin": "^3.1.5",
"moment": "^2.22.2",
"moment-timezone": "^0.5.23",
"morris.js": "^0.5.0",
"mustache": "^3.0.0",
"pace-progress": "^1.0.2",
"perfect-scrollbar": "^1.4.0",
"popper.js": "^1.14.5",
"prismjs": "^1.15.0",
"push.js": "^1.0.9",
"rangeslider.js": "^2.3.2",
"raphael": "^2.2.7",
"select2": "^4.0.5",
"select2-bootstrap-theme": "^0.1.0-beta.9",
"signalr": "^2.3.0",
"simple-line-icons": "^2.4.1",
"socicon": "^3.0.5",
"spin.js": "^2.3.2",
"summernote": "^0.8.10",
"sweetalert": "^2.1.2",
"tether": "v1.4.5",
"timeago": "^1.6.3",
"toastr": "^2.1.4",
"topojson": "^3.0.2",
"typeahead.js": "^0.11.1",
"underscore": "^1.9.1",
"urijs": "^1.19.1",
"waypoints": "^4.0.1"
},
"devDependencies": {
"gulp": "^4.0.0",
"merge-stream": "^1.0.1",
"rimraf": "^2.6.2",
"yarn": "^1.12.3"
}
}
Got back from my holidays and created an issue in GitHub as requested.
#<span></span>2218 martin-epayday