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

GridView VirtualItemCount

3 Answers 109 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ALED
Top achievements
Rank 1
ALED asked on 02 Jul 2016, 03:34 AM

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.

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 04 Jul 2016, 09:14 AM
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.
0
ALED
Top achievements
Rank 1
answered on 04 Jul 2016, 12:21 PM

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,

0
Dimitar
Telerik team
answered on 05 Jul 2016, 06:23 AM
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.
Tags
GridView
Asked by
ALED
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
ALED
Top achievements
Rank 1
Share this question
or