Dynamic resize of DataPager

4 posts, 0 answers
  1. Norsten
    Norsten avatar
    53 posts
    Member since:
    Feb 2007

    Posted 28 Jun 2010 Link to this post


    Hello,

    How can I dynamically set/resize the DataPager based on the RadGrid's Height (that will vary depending on the browser window) ?

    Cheers
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 30 Jun 2010 Link to this post

    Hi Norsten,

    Here is a sample that demonstrates this scenario.

    Hope it helps.


    Best wishes,
    Milan
    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. DevCraft banner
  4. Norsten
    Norsten avatar
    53 posts
    Member since:
    Feb 2007

    Posted 30 Jun 2010 Link to this post

    Thank you very much  -that really helped!

    (I noticed that it doesn't resize when the browser window is maximized)

  5. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 30 Jun 2010 Link to this post

    Hi Norsten,

    It seems that the ScrollViewer updates its ViewpotHeight a bit later in some situations. To fix the problem just call SetPageSize though Dispatcher.

    void playersGrid_SizeChanged(object sender, SizeChangedEventArgs e)
    {
        if (this.viewer == null)
        {
            this.InitializeViewerAndPageSize();
        }
        else
        {
            this.Dispatcher.BeginInvoke(new Action(() => this.SetPageSize()));
        }
    }


    Kind regards,
    Milan
    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
Back to Top