GridView VirtualItemCount

4 posts, 0 answers
  1. ALED
    ALED avatar
    18 posts
    Member since:
    Nov 2014

    Posted 01 Jul Link to this post

    Dear All,

    I need a radgridview with PageSize = 20; which i want fill datasource by pagesize and current page index changed,

    Ex: in Database i have record 100, so in my radgrid datasource i will fill with VirtualItemRecordCout = 100, which will generate 5 page, and fill page 1 only 20 rows from database rownum selection, and when i changed my radgrid index to page 2, i will fill my datasource from rownum 20 till 40 from my record nums in database selection.

    in ASP telerik radgridview have property VirtualItemCount, how about in WinForms ? i really need cause i have lazy record, and its so long if i much select all,

    I need your great solution.

    Thanks.

  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 04 Jul Link to this post

    Hello Aled,

    Thank you for writing.

    You can use RadVirtualGrid for this, detailed information is available here:
    I hope this helps. Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Telerik
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. ALED
    ALED avatar
    18 posts
    Member since:
    Nov 2014

    Posted 04 Jul in reply to Dimitar Link to this post

    dear Dinitras,

    RadVirtualGid not have a properties of RadVirtualItemCount like a radgrid asp, the datasource still load all data not a partial, in this i case i want like a radgrid asp consept , a properties RadGridVirtualItemCount which need for generating page, but i have a code when page index changed i would rebind radgrid which page contain index selected only, really its so more better than load all data., so can you tell me what the snippet code like what i want?

     

    thanks,

  5. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 05 Jul Link to this post

    Hello Aled,

    Thank you for writing back.

    You can use the RowCount and ColumnCount properties to set the desired(total) rows/columns number. In addition, the data is not loaded at once. The CellValueNeeded event will be fired only for the currently visible cells. For example, if the paging is enabled only the first page will be loaded. Then if the user selects another page the event will be fired again and you need to pass the data of the second page. The event arguments are containing the current cell index and based on this you need to pass the value. Another example for this is available here: Populating with Data.

    I hope that you find this information useful.

    Regards,
    Dimitar
    Telerik
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top