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

[Solved] Grid slow on Add/Edit in IE

3 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shrinath
Top achievements
Rank 1
Shrinath asked on 09 Apr 2012, 03:42 PM
I have a grid that get's filled with about 900 rows and paging is turned off. When I click to add a new record or to edit a record in Firefox, the add/edit popup comes up quick. However, in IE7/IE8 it takes a few seconds and looks sluggish. Can you provide any way to optimize this and is there any explanation why this might be performing so poorly in IE?

Here is the grid code:
<div class="grid letter-config">
    @(Html.Telerik().Grid<TransactionCodeModel>(Model)
            .Name("TransactionCode")
            .ToolBar(commands => {
                commands.Insert().ButtonType(TelerikGrid.BUTTON_TYPE);
            })
            .DataKeys(keys => keys.Add(item => item.TranCode))
            .DataBinding(dataBinding => {
                dataBinding.Ajax()
                .Insert("Create", "TransactionCode", new { aDbxname = myDatabasename })
                .Update("Edit", "TransactionCode", new { aDbxname = myDatabasename })
                .Select("Select", "TransactionCode", new { aDbxname = myDatabasename });
            })
            .Columns(columns => {
                columns.Bound(item => item.TranCode).Title("Code");
                columns.Bound(item => item.TranType).Title("Type");
                columns.Bound(item => item.Description).Title("Description").Width("40%");
                columns.Bound(item => item.TranAlt).Title("Alternate Code");
                columns.Bound(item => item.User).Title("User");
                columns.Bound(item => item.EnterDate).Format("{0:d}").Title("Enter Date");
                columns.Bound(item => item.LastModifiedDate).Format("{0:d}").Title("Last Modified");
                columns.Command(commands => {
                    commands.Edit().ButtonType(TelerikGrid.BUTTON_TYPE);
                }).HtmlAttributes(new { @class = "txt-ctr" });
            })
            .Editable(editing => editing.Mode(TelerikGrid.EDIT_MODE))
            .Sortable(sorting => sorting
                .SortMode(GridSortMode.SingleColumn)
            )
            .ClientEvents(events => {
                events.OnError("Grid_onError");
                events.OnDataBound("Grid_onDataBound");
                events.OnRowDataBound("Grid_onRowDataBound");
            })
    )
 
</div>

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 12 Apr 2012, 01:33 PM
Hello Shrinath,

The best optimization solution is to enable paging. Saving the new item will cause the whole grid to re-render. As you know IE7/IE8 browser are famous with their slow JavaScript engines.

All the best,
Nikolay Rusev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Joel
Top achievements
Rank 1
answered on 06 Jun 2012, 07:54 PM
I am also experiencing this issue, but it happens even when the grid is paged.  (1500 items in grid, 200 row pages.)

Is there a way to force the grid to do a full post back on update/insert?  Loading the grid initially isn't a problem, it's just reloading the grid that's slow.
0
Nikolay Rusev
Telerik team
answered on 11 Jun 2012, 07:28 AM
Hello Joel,

The options I see in your case:
 - decrease Grid page size
 - in case you cannot reduce the number of items per page you can use server binding only

Greetings,
Nikolay Rusev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Grid
Asked by
Shrinath
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Joel
Top achievements
Rank 1
Share this question
or