Hello,
I'm trying to get a grid with a select option just like this example http://demos.telerik.com/aspnet-core/grid/checkbox-selection
My grid loads with all the proper data however the columns.Select().Width(50); does not load any check boxes like the example does.
Here is the code that I am using. I will also attach a screen shot of what this produces.
@(
Html.Kendo()
.Grid<PlanReviewItemViewModel>()
.Name("linkFolderAttachmentPlanReviewItems")
.Columns(col =>
{
col.Select().Width(50);
col.Bound(p => p.MunicipalNumber);
})
.Sortable()
.DataSource(ds =>
{
ds.Ajax()
.Read(read =>
{
read.Action("GetPlanReviewItems", "PlanReviewItemsApi", new { caid = "PLDG5" });
});
})
)
7 Answers, 1 is accepted
The checkbox based selection is provided by the grid since the Kendo UI R2 2017 SP1 release.
That said, could you please check if switching to the latest Kendo UI version resolves the issue?
Regards,
Preslav
Progress Telerik
I created a testing project with the Kendo UI 2017.2.621 version. It seems that the checkbox column is working as expected on my side.
That said, I am attaching the testing project. Could you please check it and let me know if it working on your side also?
If you continue to experience this faulty behavior, in order to continue my investigation, could you please prepare and share a runnable sample project that clearly replicates and isolates the issue?
I look forward to hearing from you.
Regards,
Preslav
Progress Telerik
Hello,
Your project does work for us. However we are still unable to get our project working.
I am unable to attach a ZIP file to this reply. So instead here is a link to the project on github.
https://github.com/clocadevstudent/IMSCore1_1
As you can see on the Home page of our project we have a grid that loads all of the information except it still does not display any check boxes.
Please let me know if this works for you.
Thank you for providing the project. I was able to replicate the issue.
The problem comes from the fact that the NuGet is updating the Kendo DLL, however, it is not updating the source scripts. That said, after manually updating the scripts in the "IMSCore1_1\src\IMSCore\Views\Shared\_Layout.cshtml" page, the checkbox column works as expected:
<head>
<script src=
"https://kendo.cdn.telerik.com/2017.2.621/js/jquery.min.js"
></script>
@*<script src=
"~/lib/jquery/dist/jquery.js"
></script>*@
<meta charset=
"utf-8"
/>
<meta name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>@ViewData[
"Title"
] - IMSCore</title>
<link href=
"~/lib/font-awesome/css/font-awesome.css"
rel=
"stylesheet"
/>
<environment names=
"Development"
>
<link rel=
"stylesheet"
href=
"~/lib/bootstrap/dist/css/bootstrap.css"
/>
<link rel=
"stylesheet"
href=
"~/css/site.css"
/>
</environment>
<environment names=
"Staging,Production"
>
<link rel=
"stylesheet"
href=
"https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap.min.css"
asp-fallback-href=
"~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-
class
=
"sr-only"
asp-fallback-test-property=
"position"
asp-fallback-test-value=
"absolute"
/>
<link rel=
"stylesheet"
href=
"~/css/site.min.css"
asp-append-version=
"true"
/>
</environment>
<link href=
"https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.common-material.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link href=
"https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.mobile.all.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link href=
"https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.dataviz.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link href=
"https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.material.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link href=
"https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.dataviz.material.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script src=
"https://kendo.cdn.telerik.com/2017.2.621/js/jszip.min.js"
></script>
<script src=
"https://kendo.cdn.telerik.com/2017.2.621/js/kendo.all.min.js"
></script>
<script src=
"https://kendo.cdn.telerik.com/2017.2.621/js/kendo.aspnetmvc.min.js"
></script>
</head>
I hope this helps.
Regards,
Preslav
Progress Telerik
In the future is there anything we can do to prevent this issue from happening again?
To prevent this issue from happening again, I would suggest following these steps:
- Update the Kendo DLLs via NuGet.
- Navigate to the "Views\Shared\_Layout.cshtml" file and update the version of the included Kendo files.
- Run the project.
- Open the DevTools (F12).
- In the console, type this command "kendo.version"
- Check if the output matches the desired Kendo version.
Do not hesitate to write back if I can assist you with any further information.
Regards,
Preslav
Progress Telerik