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

VirtualItemCount and Sql Count

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 14 Aug 2012, 03:18 PM
Hello, 

I want to set the VirtualItemCount to the number of items within a SQL query. Following this example : http://demos.telerik.com/aspnet-ajax/grid/examples/client/virtualscrollpaging/defaultcs.aspx .

How would I set the Virtual item count whenever I do a query within the defaultcs.aspx NeedDataSource, and update the grid?

Thank you, Joe Nguyen

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 17 Aug 2012, 12:33 PM
Hello,

In order to get the items from a SQL query you should execute an aggregate function like COUNT. This will return the number of records in the specified table.

Kind regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Joe
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or