
nanthakumar thangavel
Top achievements
Rank 1
nanthakumar thangavel
asked on 10 Jul 2010, 02:30 PM
Custom Pagesize Problem using Clientside binding with cache
Please see this image..
http://i30.tinypic.com/p261t.jpg
Please see this image..
http://i30.tinypic.com/p261t.jpg
4 Answers, 1 is accepted
0
Hi,
I'm afraid that I'm unable to recreate the described behavior. Therefore it will be appreciated if you provide some details about your implementation. I have attached a small test page too, please take a look.
Best wishes,
Rosen
the Telerik team
I'm afraid that I'm unable to recreate the described behavior. Therefore it will be appreciated if you provide some details about your implementation. I have attached a small test page too, please take a look.
Best wishes,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

nanthakumar thangavel
Top achievements
Rank 1
answered on 15 Jul 2010, 08:47 AM
Default pagesize working corretly but i try to add pageSize Dynamically it's not woking
This is my code-------------------
This is my code-------------------
Private Sub SHRadGridNew_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles Me.ItemDataBound
Try
If TypeOf (e.Item) Is GridPagerItem Then
Dim myPageSizeLabel As Label = e.Item.FindControl(
"ChangePageSizeLabel"
)
myPageSizeLabel.Text =
"Records Per Page :"
Dim myPageSizeCombo As RadComboBox = e.Item.FindControl(
"PageSizeComboBox"
)
myPageSizeCombo.Items.Clear()
Dim arrPageSizes() As String = {
"10"
,
"20"
,
"50"
,
"100"
,
"200"
}
For x As Integer =
0
To UBound(arrPageSizes)
Dim myRadComboBoxItem As New RadComboBoxItem(arrPageSizes(x))
myPageSizeCombo.Items.Add(myRadComboBoxItem)
'add the following line
myRadComboBoxItem.Attributes.Add(
"ownerTableViewId"
, Me.MasterTableView.ClientID)
Next
myPageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = True
End If
If TypeOf (e.Item) Is GridCommandItem Then
e.Item.FindControl(
"addButton"
).Visible = AllowNewPermission
End If
Catch ex As Exception
Throw ex
End Try
End Sub
0
Hello,
The behavior you are experiencing is due to the fact that when the new combo items are added, the routine is setting only the item's Text property, however the Value property should be set too. Therefore please modify the RadComboBoxItem's instantiation to use the constructors overload which takes both text and value as parameters.
Best wishes,
Rosen
the Telerik team
The behavior you are experiencing is due to the fact that when the new combo items are added, the routine is setting only the item's Text property, however the Value property should be set too. Therefore please modify the RadComboBoxItem's instantiation to use the constructors overload which takes both text and value as parameters.
Best wishes,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

nanthakumar thangavel
Top achievements
Rank 1
answered on 23 Jul 2010, 11:09 AM
hi
Thanks you very much for your reply
I solved Custom Page-size Problem Using Client-side Binding Problems
This my code:
Private
Sub
SHRadGridNew_ItemCreated(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
Handles
Me
.ItemCreated
Try
If
TypeOf
(e.Item)
Is
GridPagerItem
Then
Dim
myPageSizeLabel
As
Label = e.Item.FindControl(
"ChangePageSizeLabel"
)
myPageSizeLabel.Text =
"Records Per Page :"
Dim
myPageSizeCombo
As
RadComboBox = e.Item.FindControl(
"PageSizeComboBox"
)
Dim
arrPageSizes()
As
String
= {
"100"
,
"200"
}
For
x
As
Integer
= 0
To
UBound(arrPageSizes)
Dim
myRadComboBoxItem
As
New
RadComboBoxItem(arrPageSizes(x), arrPageSizes(x))
myRadComboBoxItem.Attributes.Add(
"ownerTableViewId"
,
Me
.MasterTableView.ClientID)
If
myPageSizeCombo.Items.FindItemByValue(arrPageSizes(x))
Is
Nothing
Then
myPageSizeCombo.Items.Add(myRadComboBoxItem)
End
If
Next
myPageSizeCombo.Items.Sort(
New
PagerRadComboBoxItemComparer())
myPageSizeCombo.Items.FindItemByValue(
Me
.PageSize.ToString()).Selected =
True
End
If
Catch
ex
As
Exception
Throw
ex
End
Try
End
Sub