ItemCount binding

6 posts, 1 answers
  1. Miroslaw
    Miroslaw avatar
    2 posts
    Member since:
    Sep 2012

    Posted 04 Oct 2010 Link to this post

    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
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2477 posts

    Posted 04 Oct 2010 Link to this post

    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
  3. Miroslaw
    Miroslaw avatar
    2 posts
    Member since:
    Sep 2012

    Posted 04 Oct 2010 Link to this post

    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
  4. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2477 posts

    Posted 05 Oct 2010 Link to this post

    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
  5. hema
    hema avatar
    2 posts
    Member since:
    Mar 2017

    Posted 06 Dec 2018 in reply to Rossen Hristov Link to this post

    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.

  6. Vladimir Stoyanov
    Admin
    Vladimir Stoyanov avatar
    444 posts

    Posted 11 Dec 2018 Link to this post

    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.
Back to Top