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

Problem with checkbox in batch mode editing.

3 Answers 186 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 28 Jan 2013, 10:29 PM
I'm setting up an MVC grid with a true/false column to represent if the row is a selected row (to store in the database). The problem occurs when i click the true/false cell, a checkbox shows up as expected, but when i attempt to click the checkbox, instead of checking the box, the cell goes back to display mode. If I click the cell to put it in editing mode and use the space bar, it will check the checkbox just fine, but I need the ability to use a mouse click to check the box.

Here's the grid:
Html.Kendo().Grid<SelectedProjects>()
                .Name("StaticViewGrid")
                .HtmlAttributes(new { @style = "display:inline-block;" })
                .Columns(columns =>
                {
                    columns.Bound(o => o.Selected);
                    columns.Bound(o => o.SystemID);
                    columns.Bound(o => o.ProjectName);
                    columns.Bound(o => o.Environment);
                    columns.Bound(o => o.SitEntryDate).Format("{0:d}");
                    columns.Bound(o => o.SitExitDate).Format("{0:d}");
                    columns.Bound(o => o.ProductionInstallDate).Format("{0:d}");
                })
                .ToolBar(toolbar => toolbar.Save())
                .Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InCell))
                .Filterable()
                .Sortable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Batch(true)
                    .ServerOperation(false)
                    .Model(model =>
                    {
                        model.Id(o => o.EngagementID);
                        model.Field(o => o.Selected).Editable(true);
                        model.Field(o => o.SystemID).Editable(false);
                        model.Field(o => o.ProjectName).Editable(false);
                        model.Field(o => o.Environment).Editable(false);
                        model.Field(o => o.SitEntryDate).Editable(false);
                        model.Field(o => o.SitExitDate).Editable(false);
                        model.Field(o => o.ProductionInstallDate).Editable(false);
                    })
                    .Read(read => read.Action("SelectedEngagementItemData""Amethyst"))
                    .Update(update => update.Action("SelectedEngagementItems_Update""Amethyst"))
                )




Here's the model.

    public partial class SelectedProjects
    {
        public Guid EngagementViewID { getset; }
        public string EngagementViewName { getset; }
        public bool Selected { getset; }
        public int EngagementID { getset; }
        public Nullable<int> SystemID { getset; }
        public string ProjectName { getset; }
        public string Environment { getset; }
        public Nullable<DateTime> SitEntryDate { getset; }
        public Nullable<DateTime> SitExitDate { getset; }
        public Nullable<DateTime> ProductionInstallDate { getset; }
    }



I've looked through the forums for similar issue, but I cannot see what I'm doing wrong. Please help if you can.



3 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 29 Jan 2013, 06:34 PM
Hello Michael,

This is a known issue in Chrome. A workaround that I can suggest you is to enable the Navigatable property. This will allow you to click on the checkbox, while you are in edit mode. For additional information you could see the example shown in this Code Library.

All the best,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Mike
Top achievements
Rank 1
answered on 30 Jan 2013, 08:16 PM
Thank you Dimiter, you hit the nail on the head!

I was only using Chrome in my initial test, so I tested in IE and Firefox and verified it is not an issue in other browsers. Afterwards, I set the Navigatable property and corrected the behavior in Chrome.

Do you know if this issue will be corrected in the next release?

Thanks again. 
0
Dimiter Madjarov
Telerik team
answered on 31 Jan 2013, 12:09 PM
Hi Michael,

 
Since this is a browser issue, there is not so much that we could do. We have reported the bug in Chromium issue tracker and we recommend everyone to vote here or here to speed up the fixing process.

Have a great day!

Kind regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Mike
Top achievements
Rank 1
Share this question
or