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

Row only partially deleted when frozen and grouped in batch mode

2 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Crowley
Top achievements
Rank 1
John Crowley asked on 24 Jul 2015, 06:49 PM

I've run into a rather specific bug that only occurs when using the MVC helper - an equivalent grid created using Javascript works as expected. This is using Kendo UI v2015.2.624 (Kendo MVC 2015.2.624.545) and is non-browser-specific (reproed in Chrome, Firefox, and IE). 

In a grid in batch edit mode, grouped by a column, with some frozen columns, the delete command button will only ​delete some of the columns in the row it's in. If the delete button is locked (and thus in the locked column section) it will only delete the locked columns for that row; if it's an unlocked column, it will only delete the unlocked columns. You have to Cancel Changes, or Save Changes and refresh the grid, to get both sides to match again.

I've attached a picture showing the error. I also have a test MVC project with two equivalent grids - one created with the MVC helper, one created with Javascript. (I can't attach it because it's 16MB when zipped, and the maximum attachment size is 2MB.) The MVC helper grid displays this error, and the Javascript grid does not. Both grids have a locked and unlocked delete button to show how it only deletes each section in the MVC grid. The delete function is only a stub, so Save Changes doesn't work, but it's not needed to display the bug.

I'm sure I could hook into an event and hide the rest of the row myself, but I'm not sure I should have to, since the javascript grid works well. Is this a known bug? Is there an existing workaround? 

2 Answers, 1 is accepted

Sort by
0
John Crowley
Top achievements
Rank 1
answered on 24 Jul 2015, 07:05 PM

Since I can't attach that project, here's the MVC helper code:

 

@(Html.Kendo().Grid<KendoGridTest.Models.TestModel>()
    .Name("grid")
    .ToolBar(tool => tool.Save())
    .DataSource(data => data
        .Ajax()
        .Batch(true)
        .Read(read => read.Action("Index_Read", "Home"))
        .Destroy(destroy => destroy.Action("Index_Destroy", "Home"))
        .Update(update => update.Action("Index_Update", "Home"))
 
        .Model(model =>
        {
            model.Id(m => m.ID);
        })
        .Group(group => group.Add(m => m.Type))
    )
    .Columns(columns =>
    {
        columns.Command(command => command.Destroy())
            .Locked()
            .Width(100);
 
        columns.Bound(m => m.ID)
            .Locked()
            .Width(100);
        columns.Bound(m => m.Name)
            .Locked()
            .Width(200);
        columns.Bound(m => m.Type)
            .Locked()
            .Width(200);
 
 
        columns.Bound(m => m.Jan)
            .Width(100);
        //cut out intermediate months for brevity
        columns.Bound(m => m.Dec)
            .Width(100);
 
        columns.Command(command => command.Destroy())
            .Width(100);
    })
    .Editable(edit => edit.Mode(GridEditMode.InCell))
    .Scrollable()
    .Groupable()
)

0
Vladimir Iliev
Telerik team
answered on 28 Jul 2015, 03:04 PM
Hello Doug,

Thank you for bringing this issue to our attention. I have informed our dev team about it and it will be fixed in next internal builds. 

Also as a small sign of our appreciation I have updated your Telerik points.

Regards,
Vladimir Iliev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
John Crowley
Top achievements
Rank 1
Answers by
John Crowley
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or