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

Removed rows reappear

1 Answer 108 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Eric asked on 01 Feb 2013, 12:34 AM
I'm moving data between two different Kendo grids, removing items from one and adding them to another. I'm not going by the 'delete' command for removing them. I've noticed a bug where one of the grids has dataItems reappear in the view after triggering a filter, page, sort etc. action. This gird is created with locally bound data, via the data property of the datasource, so it has a copy of the 'pristine' data floating. I had to resort to the following to get them to be permanently removed.
var rows =,
    dataItems = [];
for (var i = rows.length; i--;) {
    for(var j =; j--; )
        if([j].Id == dataItems[0].Id) {
  , 1);
If I don't whack the removed entries from the copy, they reappear.

I haven't gotten to the point where I'm adding items back the other way, but I'm half anticipating a similar problem. Is there a solution for this? Some method to save or sync the data source?

Here's the rest of the grid declaration - I realize I could probably turn it back into a properly wrapped MVC helper extension, but I've grown to like the greater control provided by the straight JS initialization.
    dataSource: {
        schema : {
            model: {
                fields: {
                    Id: { type: "number" },
                    AdminLeadType: { type: "number" },
                    Answer1Text: { type: "string" },
                    Answer2Text: { type: "string" },
                    Enabled: { type: "boolean" },
                    QuestionText: { type: "string" },
                    QuestionTypeId : {type: "number"},
                    Price: { type: "number" }
        data : @Html.Raw(ViewBag.Data),
        pageSize: 5,
        serverFiltering: false,
        serverGrouping: false,
        serverSorting: false,
        serverPaging: false
    filterable: true,
    sortable: true,
    selectable: "multiple, row",
    columns: [{
            title:"Question Text"
    dataBound: OnChooseDataBound,
    change: OnChooseChange

1 Answer, 1 is accepted

Sort by
Petur Subev
Telerik team
answered on 04 Feb 2013, 02:46 PM
Hello Eric,

I am not able to reproduce such behavior. Could you please apply your approach to this JsBin demo so I can investigate the case?
I can see in the current example that after removing an item and then sorting, the item does not appear back.

Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Asked by
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question