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

ItemCount binding

5 Answers 177 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Miroslaw
Top achievements
Rank 1
Miroslaw asked on 04 Oct 2010, 01:33 PM
Hi,

I'm using your RadDataPager inside my custom control. I've created a class containing ItemsCount dependency property, that stores total items returned by service and I've bound it with RadDataPager.ItemCount property.

<telerik:RadDataPager x:Name="DataPager"
    DisplayMode="FirstLastPreviousNextNumeric, Text"
    ItemCount="{Binding ItemsCount, RelativeSource={RelativeSource TemplatedParent}}"
    PageSize="10" IsTotalItemCountFixed="True" />

It works well for first load, for instance if ItemsCount is 73 RadDataPager shows 8 pages. But when I've changed ItemsCount value to 6 the number of pages does not change.
I've used approach similar to ObjectDataSource in ASP.NET because query that returns items collection is quite heavy, so I've decided to make SQL paging using windowed query and count all items using other query. Could you help me to solve my problem? I'm using RadControls for Silverlight Q2 2010 SP1.

Best regards
Mirosław Piątkowski

5 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 04 Oct 2010, 01:47 PM
Hi Miroslaw,

Could you please try this with the SP2 version. In case the behavior is the same, please open a separate support ticket and attach a runnable sample project the reproduces this exact behavior. Once we have the sample project we will debug it to see what is going on. It is possible that you have discovered a bug.

We are looking forward to hearing from you.

Greetings,
Ross
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
Miroslaw
Top achievements
Rank 1
answered on 04 Oct 2010, 02:49 PM
Hi,

Thank you for quick response. I've downloaded SP2 version, but the problem still appears. Right now, when I'm setting ItemCount property the RadDataPager shows only one page no matter what the value is. I'm sending a support ticket then.

Best regards
Mirosław Piątkowski
0
Accepted
Rossen Hristov
Telerik team
answered on 05 Oct 2010, 09:05 AM
Hello Miroslaw,

Change the binding to be two-way and everything will work as expected:

ItemCount="{Binding ItemsCount, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" 

This is simply a workaround.

I have logged this issue and I hope that we will be able to provide a fix so that you do not need to set a TwoWay binding.

Here you can find the PITS Issue and follow its status: Public URL

I hope this helps.

Sincerely yours,
Ross
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
hema
Top achievements
Rank 1
answered on 06 Dec 2018, 11:27 AM

I have the similar issue and tired with mode="two way".

Its returning an issue like "RadDataPager.itemscount is allowed in unbound mode only."

So can you let me know if this issue is resolved in latest versions. or can you suggest me any solution for this problem.

0
Vladimir Stoyanov
Telerik team
answered on 11 Dec 2018, 11:26 AM
Hello,

May I ask you some questions in order to better understand the described scenario? Can you share the version that you are currently using? Also, can you confirm whether you are using the Silverlight version of the RadDataPager? May I ask you to provide some sample code of how the control is defined on your end? This will hopefully allow me to investigate the scenario on my side and further assist you.

Looking forward to your reply.

Regards,
Vladimir Stoyanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
DataPager
Asked by
Miroslaw
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Miroslaw
Top achievements
Rank 1
hema
Top achievements
Rank 1
Vladimir Stoyanov
Telerik team
Share this question
or