This is a migrated thread and some comments may be shown as answers.
Query regarding paging mechanism
5 Answers 39 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
test
Top achievements
Rank 1
test asked on 19 Jul 2011, 06:34 AM
I wanted to know how paging is currently being implemented to determine the performance impact.

1. Does the telerik grid fetch all the data in one go and store it in some internal cache from where the data is rendered on every page request?

2. Is the data retrieved from database/ repository on every page request?

Is there a way in which the existing paging mechanism can be modified to implement our custom logic?

5 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 19 Jul 2011, 07:01 AM
Hello Test Test,

 If you provide the grid with an IQueryable which is capable of executing LINQ expressions in the database level (Entity Framework, Linq to SQL, NHibernate, OpenAccess etc)  paging, sorting, filtering and grouping will happen in the database. As a result only a single page of data will be requested by the grid.

 You can also implement custom binding as shown here and here.

Greetings,
Atanas Korchev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
test
Top achievements
Rank 1
answered on 19 Jul 2011, 10:02 AM
Does implementing paging through async methods have any impact on the nested grid functionality? I am binding the nested grid through async methods also. But the nested grid is not expanding/ collapsing.
0
Atanas Korchev
Telerik team
answered on 19 Jul 2011, 11:39 AM
Hi Test,

I am are not sure what you mean. Please paste here some code which shows how the grid is configured.

All the best,
Atanas Korchev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
test
Top achievements
Rank 1
answered on 19 Jul 2011, 12:15 PM
this is the index.aspx

<%: Html.Telerik().Grid<TelerikMvcApplication23.Models.Product>()
        .Name("Grid")
        .DataBinding(dataBinding=> dataBinding.Ajax().Select("Select", "Home"))
        .DetailView(detailview => detailview.Template(e =>
            {
 
                Html.Telerik().Grid<TelerikMvcApplication23.Models.Product>()
                
                .Name("Subgrid")
                .DataBinding(databinding => databinding.Ajax().Select("Select", "Home"))
                .Columns(column =>
                    {
                        column.Bound(p => p.ID);
                        column.Bound(p => p.Name);
                         
 
                    })
                .Pageable(pager => pager.PageSize(2))
                .Filterable()
                .Render();
            }))        
%>
this is the controller

public class HomeController : AsyncController
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";
 
            return View();
        }
 
        [GridAction]
        public void SelectAsync()
        {
        }
 
        public ActionResult SelectCompleted()
        {
            return View(new GridModel(new[] { new Product { ID = 1, Name = "Product 1" } }));
        }
    }

My query is that I want to bind both the detail and child grid with the async  method. However, if i do that, the child grid is not visible on the page.
0
Atanas Korchev
Telerik team
answered on 19 Jul 2011, 12:35 PM
Hi Test,

Your child grids don't have unique ID. You need to use a client-side template so the ID is unique:

.DetailView(detailview => detailview.Template(e =>
            {
 
                Html.Telerik().Grid<TelerikMvcApplication23.Models.Product>()
                
                .Name("Subgrid<#= ID #>")


You may check the associated help topic.

Both master and child grid are bound to the same data. Is this expected?

Regards,
Atanas Korchev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
test
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
test
Top achievements
Rank 1
Share this question
or