This is a migrated thread and some comments may be shown as answers.

Grid Checkbox Selection not working

7 Answers 418 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CLOCA
Top achievements
Rank 1
CLOCA asked on 24 Jul 2017, 07:45 PM

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

Sort by
0
Preslav
Telerik team
answered on 25 Jul 2017, 07:45 AM
Hi Cloca,

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
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
CLOCA
Top achievements
Rank 1
answered on 25 Jul 2017, 10:20 AM
Hi we are using 2017.2.621 via nuget.  
0
Preslav
Telerik team
answered on 27 Jul 2017, 12:17 PM
Hello Cloca,

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
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
CLOCA
Top achievements
Rank 1
answered on 27 Jul 2017, 02:31 PM

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. 

0
Preslav
Telerik team
answered on 01 Aug 2017, 01:19 PM
Hi Cloca,

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="~/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" />
 
     
 
</head>

I hope this helps.
 

Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
CLOCA
Top achievements
Rank 1
answered on 01 Aug 2017, 01:51 PM
Thank you very much! This solved the issue.  

In the future is there anything we can do to prevent this issue from happening again? 
0
Preslav
Telerik team
answered on 02 Aug 2017, 08:44 AM
Hi Cloca,

To prevent this issue from happening again, I would suggest following these steps:
  1. Update the Kendo DLLs via NuGet.
  2. Navigate to the "Views\Shared\_Layout.cshtml" file and update the version of the included Kendo files.
  3. Run the project.
  4. Open the DevTools (F12).
  5. In the console, type this command "kendo.version"
  6. 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
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
CLOCA
Top achievements
Rank 1
Answers by
Preslav
Telerik team
CLOCA
Top achievements
Rank 1
Share this question
or