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

Problems with Grid

5 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rene
Top achievements
Rank 1
Rene asked on 01 Apr 2013, 03:18 PM
I have just updated to the latest build this morning.

2 issues with the grid:

a) when I click insert (toolbar) - it works the first time - the 2nd time - i have to refresh the browser.

b) when on the 2nd or higher page of a grid, clicking the insert does not have the popup appear.  By the looks of it, the shadow record is added to the grid on insert ... and since it's on another grid page - causes the grid to refresh and the popup edit window does not appear.

Update:  It seems like the edit popup edit window will open the first time (editing grid row) - but after that - the attached image shows what's breaking.

5 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 02 Apr 2013, 01:25 PM
Hi Rene,

 
Please find the answers of your questions below:

  1. This an known issue - more information can be found in this forum post.
  2. This is expected behavior when the ServerOperation configuration option is disabled - I would suggest to either enable the server operations or clear the current grid sort and filter before adding the new record. 

e.g.:

Add Toolbar template for add new records:
.ToolBar(toolBar => toolBar.Template("<a class=\"k-button k-button-icontext k-grid-add\" href=\"javascript:void(0)\"><span class=\"k-icon k-add\"></span>Add new item</a>"))

Manually clear the grid sort and filter before inserting new record:
$(function () {
    $("a.k-grid-add").bind("mousedown", function (e) {
        e.preventDefault();
        var grid = $("#Grid").data("kendoGrid");
        grid.dataSource.sort({});
        grid.dataSource.filter({});
        //optionally go to page 1
        //grid.dataSource.page(1);
        grid.addRow();
    })
})

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Rene
Top achievements
Rank 1
answered on 02 Apr 2013, 03:55 PM
Thanks Vladimir.

The ServerOperation(true) fixes problem b - thanks!

For the problem a - I did follow the topic below, but do not see the internal build 2013.1.327 when logged in - I only see 2013.1.319 as per: 

The suggested resolutions when using the MVC Extensions are:
Use the Latest Internal Build version 2013.1.327
Change the response of the Update/Destroy actions from just serializing the ModelState to:
return Json(ModelState.IsValid ? new object(): ModelState.ToDataSourceResult());   // Did this.


0
Rene
Top achievements
Rank 1
answered on 03 Apr 2013, 03:02 PM
0
Vladimir Iliev
Telerik team
answered on 04 Apr 2013, 06:54 AM
Hi Rene,

 
For convenience I created small screencast to show how to find the latest internal builds from your account at telerik.com.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Rene
Top achievements
Rank 1
answered on 04 Apr 2013, 01:07 PM
Thanks Vladimir
Tags
Grid
Asked by
Rene
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Rene
Top achievements
Rank 1
Share this question
or