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

GridView WinForms Paging

52 Answers 1398 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 04 Oct 2007, 05:33 PM
I have found plenty of examples of paging GridView using asp.net. Does anyone have any examples using WinForms GridView with MS 2005 SQL?

Thanks.

52 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 05 Oct 2007, 05:06 PM
Hello Terry,

Thank you for this question.

We do not support such a feature in RadGridView because in a desktop application there is no need to use paging. In the web one would prefer to keep the broadband as low as possible, however on a desktop there are no such limitations. Could you give us more details on this feature? It is possible that your case is rather specific, so we would like to hear it.

Thanks in advance.
 

Greetings,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Luca Mancuso
Top achievements
Rank 1
answered on 12 Nov 2007, 09:29 AM
it's not true that in the windows application is not useful, when we have grid with 10.000 or over row to open the windows became very slow. A good thing can be that the control didn't design or load all the row in the grid but the first N-Row and when I scroll that grid load the other row.
0
Jack
Telerik team
answered on 12 Nov 2007, 03:41 PM
Hello Luca Mancuso,

Thank you for this response.

Unfortunately, paging is not in our TODO list for the moment. We will reconsider this if more people request the same feature. In a WinForms application it preferable to use the scrollbars instead of paging.  If you need paging functionality, it is relatively simple to implement it for a custom scenario.

Don't hesitate to contact us if you have other questions.

All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Pawz
Top achievements
Rank 1
answered on 07 Dec 2007, 01:51 AM
A much more common usage of anything with 10,000 records would be to return the top 1000 rows, and then allow the user to filter the grid by whatever criteria is appropriate.. loading 10,000 records at a time is excessive way before you even get to the grid :).
0
Jack
Telerik team
answered on 07 Dec 2007, 04:56 PM
That's right, Pawz. We think that functionality similar to the paging technique in web can be realized externally through smart SQL queries. We will consider providing a sample demonstrating paging in RadGridView as a KB article on our site.
 

Best wishes,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Luca Mancuso
Top achievements
Rank 1
answered on 07 Dec 2007, 05:40 PM
the problem is not create the the paging with the query, in this way we lose the powerful of the filter, a good idea is not load all the 10.000 row in the same time, I mean when I load the dataset I have all 10.000 row but the long time is the time that the grid spend to load all the row in the grid. A good things can be that the grid load the first 400 rows ( for example) and when I move with the vertical scroll of the grid it load the next 400 rows. I made the same procedure on vb6 with my controls and it's the best solution.
0
Pawz
Top achievements
Rank 1
answered on 10 Dec 2007, 02:33 AM
I can't see it being the best way though - you're still hitting the database for thousands of records that the user never looks at, nor cares about.

I mean, your solution is probably a good way to go, and would work.. it's just the underlying design decision I'd question :).
0
Luca Mancuso
Top achievements
Rank 1
answered on 10 Dec 2007, 05:44 AM
the fast is that to load a dataset with 10.000 record you spend about 1 sec, but you load in the grid you can spend many many more time. Than if you load a top n element and you want use the filter you lose the possibility to do because you must again to the query, the most long part is the draw the item on screen so if you reduce the number of record the time to wait it's very less. Ok the best solution could be if the dataset has the page implementation but it's more easy implement the "paging" with scroll that create a dataset or datatable with paging
0
Dimitar Kapitanov
Telerik team
answered on 11 Dec 2007, 01:40 PM
Hi guys,

There are several different approaches when loading large datasets, for example paging (used mostly in ASP.NET datagrids), virtualization, etc.

We are working/researching three different approaches for the RadGridView at the moment. Whether all or some of them will be implemented depends on the approach's metrics and stability. We are still collecting data through tests and time will tell which ones will appear in the next RadGridView version. Nevertheless, we will be glad to hear your opinion on these approaches.

Here they are:
  1. Virtualized grid (columns and rows) - this approach allows you to use the grid as a thin UI layer where all specific data logic could be put outside the control.
     
  2. Asynchronous binding - here a worker thread processes the data in the background, and periodically updates the internal data pool of the grid. Then the grid refreshes just after the required amount or UI artifacts are prepared.
     
  3. Paging the data source - this is the hardest one, in my believe. Not the implementations, but the specific logic needed for grouping/filtering/sorting (as those are processes that are placed after the data is processed internally by the grid).

Your feedback will be appreciated.

 
All the best,

Dimitar Kapitanov

the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
0
Luca Mancuso
Top achievements
Rank 1
answered on 11 Dec 2007, 02:15 PM
personally I prefere the first. specially because I work with asynchron dataset so I load the data in 1 dataset and after I work "offline" and I don't refresh the data till the moment that I need. So the virtualization for me it's the best way that permit to work in synchron or asynchron way and resolve most of the problem.
0
Accepted
Pawz
Top achievements
Rank 1
answered on 11 Dec 2007, 10:26 PM
I would go with the virtualization as well. Getting the logic of handling the data out of the grid itself and allowing us programmers to handle it all would probably be a more flexible solution than trying to automate some kind of paging solution.

It's probably the least designer-friendly pick of the three, but I'd think that it would bump the grid to the next level in power & flexibility. Just so long as there is documentation :)
0
Alaki
Top achievements
Rank 1
answered on 16 May 2008, 06:54 PM

I have above 100,000 record. with loading all data into RAM and transmission in network, make performance decrease. for refreshing and loading new data it must repeat.

i think that paging is necessary for winform applications too.

0
Nikolay
Telerik team
answered on 17 May 2008, 04:28 PM
Hi Alaki,

Thank you for your opinion on this matter.

Currently, we do not have plans the implement paging in our RadGridView. However, your vote is appreciated and logged as a feature request into our tracking system.
 

Sincerely yours,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Basheer Al Ghazawi
Top achievements
Rank 1
answered on 23 Sep 2008, 03:01 PM

Dears,

Please note that we have 70,000+ records and we are facing major issues in loading them. It takes few seconds to get the records from the database, however. It takes long time trying to render them at the grid.

Finally, we would like to maintain the nice features of GridView e.g. Grouping, etc. Moreover, I believe powerful controls like RadControls for WinForms should be able to handle this number of records.

Best regards,

// Basheer Al Ghazawi

JValley Software Solutions  

The Essence of Quality !!

0
Pawz
Top achievements
Rank 1
answered on 23 Sep 2008, 11:47 PM
Don't forget to call radGridView1.GridElement.BeginUpdate(); and EndUpdate();  before and after you've loaded the data into the datasource. Check the examples to see how it's done - that will speed up your grid rendering remarkably.
0
Nikolay
Telerik team
answered on 26 Sep 2008, 05:57 PM
Hello guys,

Basheer, RadGridView supports row virtualization, so it is capable of loading and showing huge number of records. In other words, you should not experience any issues concerning this. However, if the number of columns is big, you may encounter a performance lag, because currently RadGridView does not support column virtualization. We are working on this feature and it will be implemented in one of our next versions.

As to the second issue, it will be best if you send us a sample project that reproduces the issue. This will allow us to investigate the case further, to address any potential issues and to suggest optimizations if such are possible.

Pawz, radGridView1.GridElement.BeginUpdate() and EndUpdate will indeed boost performance, but only if you are manually inserting numerous rows in RadGridView.


Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Richard Slade
Top achievements
Rank 2
answered on 05 Feb 2010, 09:38 AM
My vote registered too for in-built paging into the datagrid.
I agree, that a well structured SQL query can return many records very quickly, but actually rendering them to the screen takes many times longer.
It would certainly be a nice to have feature.
Richard
0
Nikolay
Telerik team
answered on 08 Feb 2010, 02:43 PM
Hi Richard Slade,

Thank you for your vote.

Please note that RadGridView uses virtualization for its cells, so not all the data cells are rendered. For additional information, refer to the following help article: Logical vs. Visual Grid Structure.

As to the paging feature, you can easily achieve such behavior using LINQ. For additional information, please refer to the following blog post: Emulating Paging with RadGridView for WinForms and LINQ with 1 million records.

Sincerely yours,
Nikolay
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
randall
Top achievements
Rank 1
answered on 12 Feb 2010, 02:25 AM
I vote for the paging too.
i have a application that calls the Data from a online server. So it basicly works like the ASP.net but is not a web solution.
therefore i'd like to page the  data in so that the network connections are limited.

id there another way to do this in code maybe?

thanks
0
Nikolay
Telerik team
answered on 16 Feb 2010, 02:11 PM
Hello randall,

Thank you for your vote.

Please note that RadGridView is a UI control which just represents the data taken from a DataSource in a pleasant and understandable way. However, it is not a duty of RadGridView to take limited amount of data from your database. In case we decide to implement paging, it will be just a visual paging which will display a given number of records on a page. However, this feature will not limit the network connections.

You can refer to my previous post which gives a link to a page implementation with the help of LINQ to SQL.

Best wishes,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
husam
Top achievements
Rank 1
answered on 30 Sep 2010, 08:37 AM
Dear Telerik Team,

guys you have to create the paging for the desktop application's because really it's needed as Luca Mancuso said and also
we have too much different scenario's that need paging 
0
Nikolay
Telerik team
answered on 04 Oct 2010, 09:02 AM
Hello husam,

Thank you for your vote.

As I mentioned above, you can use the approach given in the following blog post: Emulating Paging with RadGridView for WinForms and LINQ with 1 million records.

Currently, I am not able to provide you with a specific time frame concerning the built-in paging feature.

Regards,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 12 Oct 2010, 07:04 AM
Hello,

I ve same scenario, where there are 20,000 rows which are having grouping facility.
Also, one columns is continuiosly updating value like Price of stock, some of the columns have expression using that price of stock.
Now on continuous Refreshing of Price is making Grid unresponsive to user.
Thats why i am seraching for resolving issue.
I found this forum, and some virstual mode function.
Is it possible to use this feature with DataTable as binding source????

Can you please provide sample code shows use of virtual mode in radgridview with Datatable binding?
Or Any other solution???
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 12 Oct 2010, 08:45 AM
Hello James,

For more information on how to implement virtual mode for the RadGridView, please take a look at this help article.

But i have to warn you that from what i now, RadGridView does not process filtering, sorting, and grouping in Virtual Mode. Only the UI and expression collections are updated.

You can use FilterChanged, SortChanged, and GroupByChanged events to implement you logic for virtual mode. The events notify for a change in the related expression collections and send updates to RadGridView UI to fire CellValueNeeded event to fill again the displayed cells in the current grid view.

There were some plans to include this in the future versions, but from what i know this hasn't happened yet.

But as the previous replies have stated, the fact of the matter is with Linq you are getting just the data you can see, and from what i understand, this could be a problem in your case because you need to be able to change the values on the entire DataSet, DataTable?

Another easier option is to use a timer, that would perform a refresh every x seconds.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga

0
Jaco Van Zyl
Top achievements
Rank 1
answered on 18 Jan 2011, 02:50 PM
Please register my vote also!
0
David Tabatadze
Top achievements
Rank 1
answered on 31 Jan 2011, 09:50 PM

Hey guys.

I have read this thread and i'd like to vote too.

I strongly believe that paging option in grid is one of the most important

(i mean in real projects, where the data is really big - thousands, maybe millions)

Hope this option will appear soon...

0
Nikolay
Telerik team
answered on 03 Feb 2011, 01:09 PM
Hello guys,

Thank you for your votes.

Regards,
Nikolay
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
subbarayan
Top achievements
Rank 1
answered on 04 Feb 2011, 12:34 PM
me toooooooo...
0
Stefan
Telerik team
answered on 09 Feb 2011, 10:03 AM
Hello everyone, 

In order to make this voting easier, I have added this request to our Public Issue Tracking System where you can add your votes, comments and subscribe to the status updates regarding the feature. You can find the PITS item at this link.

Regards,
Stefan
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
William
Top achievements
Rank 1
answered on 22 Feb 2011, 05:00 PM
I agree Paging is a necessity. I have gotten very to acquainted with the feature in Web Applications and just seems like something is wrong when I try to load data in a grid without it now. I don't do Windows applications very often but I wish it were available when I did develop one
0
Stefan
Telerik team
answered on 24 Feb 2011, 08:32 AM
Hello William, 

Thank you for your feedback. You can add your vote for this feature request in the provided link in my previous post.
 
Regards,
Stefan
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Emanuel Varga
Top achievements
Rank 1
answered on 24 Feb 2011, 11:41 AM
Hello guys,

Please take a look at the following sample and let me know what you think. It's just a very basic example of paging using a command bar. Sorry that i didn't have time to make it cleaner and handle a few other details, like overflow and so on, but i hope this will put you on the right pat if you decide to use this:

First, the custom control:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Telerik.WinControls.UI;
 
public partial class GridWithPagingControl : UserControl
{
    #region Constants and Fields
 
    private object dataSource;
    private Dictionary<int, object> pagesDictionary;
    private Timer resizeTimer;
    private int currentPageNo;
 
    #endregion Constants and Fields
 
    #region Constructors and Destructors
 
    public GridWithPagingControl()
    {
        InitializeComponent();
        pagesDictionary = new Dictionary<int, object>();
        resizeTimer = new Timer();
        resizeTimer.Interval = 100;
        resizeTimer.Tick += new EventHandler(resizeTimer_Tick);
    }
 
    #endregion Constructors and Destructors
 
    #region Overrides
 
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
    }
 
    protected override void OnSizeChanged(EventArgs e)
    {
        base.OnSizeChanged(e);
        if (radGridView1.DataSource == null)
        {
            ClearPages();
            radCommandBar1.Visible = false;
            return;
        }
 
        resizeTimer.Enabled = false;
        resizeTimer.Enabled = true;
    }
 
    #endregion Overrides
 
    #region Properties
 
    public RadGridView GridView
    {
        get
        {
            return radGridView1;
        }
    }
 
    public object DataSource
    {
        get
        {
            return dataSource;
        }
        set
        {
            if (dataSource != value)
            {
                dataSource = value;
 
                if (dataSource as IList == null)
                {
                    throw new ArgumentException("DataSource must be of IList type");
                }
 
                CreatePages();
                SelectFirstPage();
            }
        }
    }
 
    public int CurrentPageNo
    {
        get
        {
            return currentPageNo;
        }
    }
 
    #endregion Properties
 
    #region Public Methods
 
    public bool SelectPage(int pageNo)
    {
        if (!pagesDictionary.ContainsKey(pageNo))
        {
            return false;
        }
 
        radGridView1.DataSource = pagesDictionary[pageNo];
        txtCurrentPage.Text = pageNo.ToString();
        currentPageNo = pageNo;
        var button = stripElementPages.Items.Where(b => b.Tag is int && ((int)b.Tag) == pageNo).FirstOrDefault() as CommandBarToggleButton;
        if (button != null)
        {
            button.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On;
        }
 
        CheckNavigationButtonsState();
 
        return true;
    }
 
    public bool SelectFirstPage()
    {
        return SelectPage(pagesDictionary.Keys.FirstOrDefault());
    }
 
    public bool SelectLastPage()
    {
        return SelectPage(pagesDictionary.Keys.LastOrDefault());
    }
 
    public bool SelectNextPage()
    {
        return SelectPage(currentPageNo + 1);
    }
 
    public bool SelectPreviousPage()
    {
        return SelectPage(currentPageNo - 1);
    }
 
    #endregion Public Methods
 
    #region Event Handlers
 
    void resizeTimer_Tick(object sender, EventArgs e)
    {
        resizeTimer.Stop();
        radCommandBar1.Visible = true;
        CreatePages();
        SelectFirstPage();
    }
 
    void pageButton_ToggleStateChanged(object sender, StateChangedEventArgs args)
    {
        var button = sender as CommandBarToggleButton;
 
        if (button.ToggleState == Telerik.WinControls.Enumerations.ToggleState.Off)
        {
            return;
        }
 
        var pageNo = -1;
        int.TryParse(button.Tag.ToString(), out pageNo);
        if (pageNo == -1)
        {
            return;
        }
 
        //button.ToggleState = args.ToggleState;
 
        var selectedbutton = stripElementPages.Items.Where(i =>
            i is CommandBarToggleButton &&
            ((CommandBarToggleButton)i).ToggleState == Telerik.WinControls.Enumerations.ToggleState.On && i != button).FirstOrDefault() as CommandBarToggleButton;
        if (selectedbutton != null)
        {
            selectedbutton.ToggleState = Telerik.WinControls.Enumerations.ToggleState.Off;
        }
 
        if (currentPageNo != pageNo)
        {
            SelectPage(pageNo);
        }
    }
 
    void pageButton_ToggleStateChanging(object sender, StateChangingEventArgs args)
    {
        args.Canceled = (stripElementPages.Items.Where(i =>
            i is CommandBarToggleButton &&
            ((CommandBarToggleButton)i).ToggleState == Telerik.WinControls.Enumerations.ToggleState.On &&
            args.NewValue == Telerik.WinControls.Enumerations.ToggleState.Off).ToArray().Length) == 1;
    }
 
    private void radGridView1_DataBindingComplete(object sender, Telerik.WinControls.UI.GridViewBindingCompleteEventArgs e)
    {
    }
 
    private void btnFirst_Click(object sender, EventArgs e)
    {
        SelectFirstPage();
    }
 
    private void btnPrevious_Click(object sender, EventArgs e)
    {
        SelectPreviousPage();
    }
 
    private void btnNext_Click(object sender, EventArgs e)
    {
        SelectNextPage();
    }
 
    private void btnLast_Click(object sender, EventArgs e)
    {
        SelectLastPage();
    }
 
    private void brnSelect_Click(object sender, EventArgs e)
    {
        var pageNo = -1;
        int.TryParse(txtCurrentPage.Text, out pageNo);
        if (pageNo == -1)
        {
            return;
        }
        SelectPage(pageNo);
    }
 
    #endregion Event Handlers
 
    #region Methods
 
    private void CheckNavigationButtonsState()
    {
        btnFirst.Enabled = currentPageNo != 1;
        btnPrevious.Enabled = btnFirst.Enabled;
        btnLast.Enabled = currentPageNo != pagesDictionary.Count;
        btnNext.Enabled = btnLast.Enabled;
    }
 
    private void CreatePages()
    {
        ClearPages();
        if (dataSource == null)
        {
            return;
        }
 
        radGridView1.DataSource = dataSource;
        radGridView1.LoadElementTree();
 
        var numberOfRowsPerPage = radGridView1.GridElement.VisualRows.Count(c => c.RowInfo is GridViewDataRowInfo) - 1;
 
        var list = dataSource as IList;
        pagesDictionary.Clear();
        IList pageSource = null;
        for (int i = 0; i < list.Count; i++)
        {
            var pageNo = i / numberOfRowsPerPage + 1;
            if (!pagesDictionary.ContainsKey(pageNo))
            {
                pageSource = Activator.CreateInstance(dataSource.GetType()) as IList;
                pagesDictionary.Add(pageNo, pageSource);
                var pageButton = new CommandBarToggleButton();
                stripElementPages.Items.Add(pageButton);
                pageButton.ToggleStateChanging += new StateChangingEventHandler(pageButton_ToggleStateChanging);
                pageButton.ToggleStateChanged += new StateChangedEventHandler(pageButton_ToggleStateChanged);
                pageButton.Text = pageNo.ToString();
                pageButton.Tag = pageNo;
                pageButton.Image = null;
                pageButton.DrawText = true;
            }
 
            pageSource = pagesDictionary[pageNo] as IList;
            pageSource.Add(list[i]);
        }
 
        lblNumPages.Text = pagesDictionary.Count.ToString();
 
        radCommandBar1.Visible = true;
    }
 
    private void ClearPages()
    {
        var label = stripElementPages.Items.FirstOrDefault();
 
        stripElementPages.Items.Clear();
        if (label != null)
        {
            stripElementPages.Items.Add(label);
        }
    }
 
    #endregion Methods
}

and the test form:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
 
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
        this.Size = new Size(640, 480);
    }
 
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        LoadListDataSource();
    }
 
    private void LoadListDataSource()
    {
        var employees = new List<Employee>();
        for (int i = 0; i < 100; i++)
        {
            employees.Add(new Employee
            {
                Id = i,
                Name = "Employee " + i,
                Email = "Employee." + i + "@something.com"
            });
        }
 
        gridWithPagingControl1.GridView.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
        gridWithPagingControl1.DataSource = employees;
    }
}
 
public class Employee
{
    public int Id
    {
        get;
        set;
    }
 
    public string Name
    {
        get;
        set;
    }
 
    public string Email
    {
        get;
        set;
    }
}

If you have any problems just let me know, meanwhile i hope i'll have some time to clean up a few of the details and add this to the code library.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
Stefan
Telerik team
answered on 25 Feb 2011, 02:23 PM
Hi Emanuel,

Thank you for providing this sample of RadGridView paging functionality. Since it seems quite interesting, I think it is a good idea to make a Code Library article based on it. This will allow our users to find it easily.

Thank you for your cooperation.

All the best,
Stefan
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jaco Van Zyl
Top achievements
Rank 1
answered on 25 Feb 2011, 02:41 PM
Hi Emanuel

Could you perhaps upload the code here.  It will just make it slightly easier than creating the usercontrol (ie commandbar with buttons etc).

Yip, I can be very lazy sometimes...

Jaco van Zyl
0
Nikolay
Telerik team
answered on 25 Feb 2011, 02:51 PM
Hello Jaco Van Zyl,

Our forums does not allow for attaching files. One should post a code library article if he/she wants to share his/her solution with the community.

All the best,
Nikolay
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jaco Van Zyl
Top achievements
Rank 1
answered on 25 Feb 2011, 03:15 PM
Thanks for the info Nikolay.
0
Emanuel Varga
Top achievements
Rank 1
answered on 25 Feb 2011, 04:18 PM
Hello again guys,

Sorry again for the late reply but everything is crazy lately.

I have just submitted the project to the code library with a few enhancements, like support for sorting, filtering.

Please take a look at the attached images for more info.
As soon as the project will be approved i will post a link here.

On a sadder note (maybe), this version will only support IList data sources.

Please feel free to suggest other functionalities or other possible behaviors.

Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
Stefan
Telerik team
answered on 28 Feb 2011, 05:33 PM
Hi guys,

Thanks to Emanuel there is a sample application demonstrating this funcionality. It is available in our Code Library section at this link

I hope you will find this useful.

Greetings,
Stefan
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Emanuel Varga
Top achievements
Rank 1
answered on 01 Mar 2011, 04:41 PM
Hello guys,

So, did someone have any time to take a look at the grid with paging code project?

Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
&lt;&gt;&lt;
Top achievements
Rank 1
answered on 19 Apr 2011, 09:55 PM
Please note, I am not a telerik user yet, but will be starting using your controls at work in the coming weeks and am reading up on it.

By just glancing at the code, it seems that the entire datasource is loaded and then all the paging etc is done, which I believe will cause the application to crawl if a significant amount of rows are loaded...and there is no need to load 1million rows to be able to use the filtering capabilities.

Instead, if you can handle the filtering manually (ie, no automatic filtering and handle events triggered before filtering is going to take place) and convert that telerik filter conditions into a equivalent SQL query, this can be handled very easily. 

I don't know if the telerik controls have the ability to convert telerik grid filter conditions to SQL server queries, if not, you can probably create a recursive function to create a SQL query from the filter condition (assuming you have access to the filter conditions)...the ability for telerik to automatically convert it to a SQL query would be a plus.

Everything else can be handled by code very easily, as I have done that using another grid by another company and it works really well, as I only the top 500 rows and allow the user paginate through them.  When the grid is filtered, a new query is created and the returned value is then bound to the grid....etc.

Just my 2c

Take Care
0
Julian Benkov
Telerik team
answered on 22 Apr 2011, 09:38 AM
Hi Karim,

Thank you for your comments and suggestions. Currently, this functionality is not natively supported by RadGridView. The desired behavior can be achieved by using the custom filtering and converting FilterDescriptors collection to SQL query. 

We will continue researching the possible implementation in Windows Forms context and binding. This feature will be included in one of the next major releases of RadControls for Winforms.

Best wishes,
Julian Benkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lizeth
Top achievements
Rank 1
answered on 04 Aug 2011, 07:14 PM
Me too vote for paging, I want to buy the controls and this case is very importat for the company where it going to implement. =S
0
Svett
Telerik team
answered on 08 Aug 2011, 03:49 PM
Hello Lizeth,

Thank you for writing.

The number of votes for this feature increase its priority in our TO DO list. Feel free to vote for it here.

Greetings,
Svett
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
h g
Top achievements
Rank 1
answered on 12 May 2012, 08:07 AM
Did you still implement this feature? if not when is your estimate ?
0
Svett
Telerik team
answered on 15 May 2012, 12:08 PM
Hi h g,

This feature is not implemented yet. In order to increase its priority, you can vote for it in at link that I have already provided in my previous post.

Kind regards,
Svett
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Stanley
Top achievements
Rank 1
answered on 25 Jun 2012, 01:11 AM
Found the link, 48 voted
http://www.telerik.com/support/pits.aspx#/public/winforms/4775

How come 5 years still does not provide the Paging, very very disappointed.

0
Svett
Telerik team
answered on 25 Jun 2012, 11:43 AM
Hi Stanley,

The paging is more suitable for web applications and it is not a common UI in desktop application. Moreover, this features is covered by a pretty well working Code Library article. Therefore, this feature is postponed in favor of other desired WinForms features that would be hard to be implemented outside the WinForms suite.

Kind regards,
Svett
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Jati
Top achievements
Rank 1
answered on 22 Jul 2012, 11:02 PM
Wow...it's been 5 years in queue
0
Robert LeGood
Top achievements
Rank 1
answered on 18 Apr 2013, 06:15 PM
Man, I'd love to have this functionality.    It would help my current app that needs to display >600,000 rows of data.

The problem with the user supplied solution is that is needs objects that are ILists, and I only have DataTables.  In addition, I imagine that filter boxes would only read from the visible values.  (vs. all the values when creating the Excel like filtering options)

Rob.
0
Peter
Telerik team
answered on 22 Apr 2013, 01:36 PM
Hello Rob,

I am sorry for the inconvenience caused.

As we mentioned paging is not a common for UI in desktop application. You can change our example to use a DataTable as follows:
private void LoadListDataSource()
       {
          var employees = new List<Employee>();
          int i = 0;
          foreach(DataRow dr in yourTable.Rows)
           {
               Employee emp = new Employee();
               emp.Id = (int)dr["ID"].ToString();
               emp.Name = "Employee " +dr["Name"].ToString();
               employees.Add(emp);
               ++i;
           }

You can refer to this StackOverflow article for more details about convert DataTable to List.

I hope this helps.

Kind regards,
Peter
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
Alvaro
Top achievements
Rank 1
answered on 14 Oct 2013, 03:25 PM
Hello Everyone,

please, sorry for my English.

There is a bug with the Paging Example, when yo try to filtering data using the "Custom Filtering".
It shows a Exception Null Reference in class Main for the GridWithPaging example.
I want to know if there is a solution for this bug.

thank's

Alvaro.
0
Peter
Telerik team
answered on 16 Oct 2013, 11:38 AM
Hi Alvaro,

Thank you for writing.

The provided information is not enough to determine what causes this. Could you, please, enable the exceptions in your Visual Studio (Debug -> Exceptions -> Managed Exceptions, check the checkbox) in order to debug where exactly the project crashes and let me know what is the result on your side?

Please, have in mind that the filtering is not supported in this mode and can be achieved by using the custom filtering but you should manually convert the FilterDescriptors collection to SQL query.

I hope this helps.

Regards,
Peter
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Terry
Top achievements
Rank 1
Answers by
Jack
Telerik team
Luca Mancuso
Top achievements
Rank 1
Pawz
Top achievements
Rank 1
Dimitar Kapitanov
Telerik team
Alaki
Top achievements
Rank 1
Nikolay
Telerik team
Basheer Al Ghazawi
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
randall
Top achievements
Rank 1
husam
Top achievements
Rank 1
James
Top achievements
Rank 1
Emanuel Varga
Top achievements
Rank 1
Jaco Van Zyl
Top achievements
Rank 1
David Tabatadze
Top achievements
Rank 1
subbarayan
Top achievements
Rank 1
Stefan
Telerik team
William
Top achievements
Rank 1
&lt;&gt;&lt;
Top achievements
Rank 1
Julian Benkov
Telerik team
Lizeth
Top achievements
Rank 1
Svett
Telerik team
h g
Top achievements
Rank 1
Stanley
Top achievements
Rank 1
Jati
Top achievements
Rank 1
Robert LeGood
Top achievements
Rank 1
Peter
Telerik team
Alvaro
Top achievements
Rank 1
Share this question
or