Hi
I am retrieving data from database table (MS SQL Server), which can have thousands of rows. DataSource for RadGrid is an EntityDataSource control.
For performance & usability reasons I have activated paging. This works really good as long as grouping is not involved! SQL on server-side only returns rows for current page when grouping is not enabled, but when it is always all rows get returned. It was verified by SQL Profiler.
I have checked all properties in EntityDataSource (and of EntityDataSourceView control - in OnQueryCreated event) and they are all correct for paging and sorting (see http://msdn.microsoft.com/en-us/library/vstudio/cc488534%28v=vs.100%29.aspx).
And also RadGrid.EnableLinqExpressions and MasterTableView.EnableLinqGrouping are set to true.
Here relevant markup:
Any ideas?
Thanks,
Roger
I am retrieving data from database table (MS SQL Server), which can have thousands of rows. DataSource for RadGrid is an EntityDataSource control.
For performance & usability reasons I have activated paging. This works really good as long as grouping is not involved! SQL on server-side only returns rows for current page when grouping is not enabled, but when it is always all rows get returned. It was verified by SQL Profiler.
I have checked all properties in EntityDataSource (and of EntityDataSourceView control - in OnQueryCreated event) and they are all correct for paging and sorting (see http://msdn.microsoft.com/en-us/library/vstudio/cc488534%28v=vs.100%29.aspx).
And also RadGrid.EnableLinqExpressions and MasterTableView.EnableLinqGrouping are set to true.
Here relevant markup:
<
telerik:RadGrid
ID
=
"VialsGrid"
runat
=
"server"
CellSpacing
=
"0"
AllowPaging
=
"true"
PageSize
=
"50"
AllowFilteringByColumn
=
"true"
AutoPostBackOnFilter
=
"true"
AutoGenerateColumns
=
"false"
AllowSorting
=
"true"
GridLines
=
"None"
Width
=
"1000"
ItemStyle-VerticalAlign
=
"Top"
AlternatingItemStyle-VerticalAlign
=
"Top"
DataSourceID
=
"VialsGridDataSource"
EnableLinqExpressions
=
"true"
OnUpdateCommand
=
"VialsGrid_UpdateCommand"
OnItemCreated
=
"VialsGrid_ItemCreated"
>
<
MasterTableView
DataKeyNames
=
"VialLocationID"
Name
=
"MasterTableView"
CommandItemDisplay
=
"Top"
EnableLinqGrouping
=
"true"
>
<
Columns
>
...
</
Columns
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"true"
ShowRefreshButton
=
"true"
></
CommandItemSettings
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldName
=
"VialLocationGroupName"
FieldAlias
=
"VialLocationGroupName"
HeaderText
=
"Group"
/>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"VialLocationGroupName"
/>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"function(){}"
OnMasterTableViewCreated
=
"MasterTableViewCreated"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
</
div
>
<
asp:EntityDataSource
ID
=
"VialsGridDataSource"
runat
=
"server"
ConnectionString
=
"name=EmbryoDBEntities"
DefaultContainerName
=
"EmbryoDBEntities"
EnableFlattening
=
"false"
EnableInsert
=
"false"
EnableUpdate
=
"true"
EnableDelete
=
"false"
EntitySetName
=
"VialLocationViews"
OrderBy
=
"it.VialLocationGroupName, it.VialLocation asc"
AutoPage
=
"true"
AutoSort
=
"true"
OnQueryCreated
=
"VialsGridDataSource_QueryCreated"
>
</
asp:EntityDataSource
>
Any ideas?
Thanks,
Roger