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

Record Count is not correct when ServerOperation=false

3 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Natalia
Top achievements
Rank 1
Natalia asked on 14 Feb 2013, 10:46 PM
Hi,

I have a similar code as your sample (http://demos.kendoui.com/web/grid/editing.html)

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()    
    .Name("Grid")    
    .Columns(columns => {        
        columns.Bound(p => p.ProductName);
        columns.Bound(p => p.UnitPrice).Width(140);
        columns.Bound(p => p.UnitsInStock).Width(140);
        columns.Bound(p => p.Discontinued).Width(100);
        columns.Command(command => command.Destroy()).Width(110);
    })
    .ToolBar(toolbar => {
        toolbar.Create();
        toolbar.Save();        
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable()
    .Sortable()
    .Scrollable()
    .DataSource(dataSource => dataSource        
        .Ajax()         
        .Batch(true)
        .ServerOperation(false)
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.ProductID))
        .Create("Editing_Create", "Grid")
        .Read("Editing_Read", "Grid")
        .Update("Editing_Update", "Grid")
        .Destroy("Editing_Destroy", "Grid")
    )
)
When I tried to add a new record, the count is incremented (say from 6 to 7), but once I hit the Save button, the count goes back to 6. If I refresh the page, the count will be correct (7). Any idea on how to fix this? Thank you so much.

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 15 Feb 2013, 09:45 AM
Hi Natalia,

The issue you have described is a known one and has been already addressed. The fix is included in the latest internal build and will be also available in the next official release of KendoUI.

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Natalia
Top achievements
Rank 1
answered on 15 Feb 2013, 01:56 PM
Hi Rosen,

Thank you for your reply. Would you be able to tell me when the next release will be available?

Regards,

Natalia
0
Rosen
Telerik team
answered on 15 Feb 2013, 02:35 PM
Hello Natalia,

The Q1 2013 release of KendoUI is scheduled for second half of March.

Greetings,
Rosen
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
Natalia
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Natalia
Top achievements
Rank 1
Share this question
or