This was working in previous versions of the RadControls for ASP.NET AJAX, but now with version 2012.3.1016.35 it does not. I have a grid with both grouping and paging enabled, and only the first page appears. If I remove the <telerik:GridGroupByExpression> tag from the grid then the other pages are accessible.
Am I doing something wrong or is this a bug in the otherwise excellent Telerik controls?
Thanks -
Brad Harris
Here is my markup:
And the codebehind:
Am I doing something wrong or is this a bug in the otherwise excellent Telerik controls?
Thanks -
Brad Harris
Here is my markup:
<
html
>
<
head
>
<
title
>Grid Group & Page Test</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
telerik:RadGrid
ID
=
"RgDamageCases"
runat
=
"server"
AllowAutomaticDeletes
=
"false"
AllowAutomaticInserts
=
"false"
AllowAutomaticUpdates
=
"false"
AllowFilteringByColumn
=
"true"
AllowMultiRowEdit
=
"false"
AllowPaging
=
"true"
AllowSorting
=
"false"
AutoGenerateColumns
=
"false"
GridLines
=
"Horizontal"
PageSize
=
"5"
OnNeedDataSource
=
"RgDamageCases_NeedDataSource"
>
<
MasterTableView
DataKeyNames
=
"Id"
CommandItemDisplay
=
"None"
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldAlias
=
"State"
FieldName
=
"State"
HeaderValueSeparator
=
": "
/>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"State"
SortOrder
=
"Ascending"
/>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
<
Columns
>
<
telerik:GridBoundColumn
UniqueName
=
"State"
DataField
=
"State"
HeaderText
=
"State"
AllowFiltering
=
"true"
AllowSorting
=
"true"
DataType
=
"System.String"
Visible
=
"true"
/>
<
telerik:GridBoundColumn
UniqueName
=
"Name"
DataField
=
"Name"
HeaderText
=
"Name"
AllowFiltering
=
"false"
AllowSorting
=
"true"
DataType
=
"System.String"
Visible
=
"true"
/>
</
Columns
>
<
PagerStyle
AlwaysVisible
=
"true"
Position
=
"TopAndBottom"
Mode
=
"NextPrevAndNumeric"
Visible
=
"true"
/>
</
MasterTableView
>
<
GroupingSettings
CaseSensitive
=
"false"
ShowUnGroupButton
=
"true"
/>
</
telerik:RadGrid
>
</
form
>
</
body
>
</
html
>
And the codebehind:
Imports
System.Collections.ObjectModel
Imports
Telerik.Web.UI
Partial
Class
GridTest01Page
Inherits
System.Web.UI.Page
Protected
Sub
RgDamageCases_NeedDataSource(
ByVal
source
As
Object
,
ByVal
e
As
GridNeedDataSourceEventArgs)
Dim
grid
As
RadGrid =
CType
(source, RadGrid)
Dim
items
As
New
Collection ( Of MyType )
items.Add (
New
MyType ( 1,
"001 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 2,
"002 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 3,
"003 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 4,
"004 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 5,
"005 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 6,
"006 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 7,
"007 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 8,
"008 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 9,
"009 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 10,
"010 Test"
,
"AZ"
) )
items.Add (
New
MyType ( 11,
"011 Test"
,
"AZ"
) )
grid.DataSource = items
End
Sub
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
' Nothing Here
End
Sub
End
Class
Public
Class
MyType
Private
_Id
As
Integer
Private
_Name
As
String
Private
_State
As
String
Public
Property
Id
As
Integer
Get
Return
_Id
End
Get
Set
(value
As
Integer
)
_Id = value
End
Set
End
Property
Public
Property
Name
As
String
Get
Return
_Name
End
Get
Set
(value
As
String
)
_Name = value
End
Set
End
Property
Public
Property
State
As
String
Get
Return
_State
End
Get
Set
(value
As
String
)
_State = value
End
Set
End
Property
Public
Sub
New
(
ByVal
id
As
Integer
,
ByVal
name
As
String
,
ByVal
state
As
String
)
Me
.Id = id
Me
.Name = name
Me
.State = state
End
Sub
End
Class