ListView data binding, performance and waiting sign

3 posts, 1 answers
  1. Rohit
    Rohit avatar
    20 posts
    Member since:
    Dec 2017

    Posted 07 Jan Link to this post

    Hi

    I have two radlistviews in a radpageview control in stack viewmode. Both the listviews can potentially have large amounts of data (> 5 million rows) simultaneously. Both the lists need to be loaded when application starts and display a flat list of items (without grouping and sorting) but I need the filtering functionality.

    1. I want to show a waiting sign (or a progressbar if possible) so that the user knows he has to wait for the list to load before starting any interactions.It will be good if the lists can be populated in chunks rather than all at once.

    2. I want display the details of the selected item when the user double clicks or press enter key on any dataitem. How do I achieve this.

    3. I feel ashamed to ask this one - Can I access the selected item text anytime I need it directly from the control or I can only access it on some event and need to store it somewhere for later use?

    4. I load the data to populate the lists from the database as dataset using async/await method.The step where I assign the dataset as datasource to listview is very time consuming and makes my application hang.I am not binding the data to the lists as described in the docs here. I simply set the datasource, datamember and displaymember properties.

    From a performance perspective, is it a better approach to bind the data as described in the docs?

    Please suggest a high performance solution so that my app does not hang or freeze and can easily handle data upto 10 million items per list at least.

    Thanks.

  2. Answer
    Dess
    Admin
    Dess avatar
    2580 posts

    Posted 08 Jan Link to this post

    Hello, Rohit,  

    Thank you for writing.  

    According to the provided information, the most suitable control from the Telerik UI for WinForms suite is RadVirtualGrid. It is a grid component developed on top of Telerik Presentation Framework which provides a convenient way to implement your own data management operations and optimizes the performance when interacting with large amounts of data. It also supports filtering and busy indicators.

    You can handle the RadVirtualGrid.CellDoubleClick event in order to detect which cell is clicked:
    this.radVirtualGrid1.BeginEditMode = Telerik.WinControls.UI.RadVirtualGridBeginEditMode.BeginEditProgrammatically;
    this.radVirtualGrid1.CellDoubleClick+=radVirtualGrid1_CellDoubleClick;

    private void radVirtualGrid1_CellDoubleClick(object sender, EventArgs e)
    {
        VirtualGridCellElementEventArgs args = e as VirtualGridCellElementEventArgs;
        if (args!=null)
        {
            Console.WriteLine(args.CellElement.Text );
        }
    }

    As to the selection in the grid, the Selection property of the VirtualGridElement you can perform various selection operations and gives you access to the current selection. Additional information is available in the following help article: https://docs.telerik.com/devtools/winforms/virtualgrid/selection/selection

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Rohit
    Rohit avatar
    20 posts
    Member since:
    Dec 2017

    Posted 09 Jan Link to this post

    Thank you for your reply and advice to my questions.
Back to Top