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

Dynamic resize of DataPager

3 Answers 53 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Norsten
Top achievements
Rank 1
Norsten asked on 28 Jun 2010, 09:13 PM

Hello,

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

Cheers

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 30 Jun 2010, 09:38 AM
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
0
Norsten
Top achievements
Rank 1
answered on 30 Jun 2010, 03:32 PM
Thank you very much  -that really helped!

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

0
Milan
Telerik team
answered on 30 Jun 2010, 03:48 PM
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
Tags
DataPager
Asked by
Norsten
Top achievements
Rank 1
Answers by
Milan
Telerik team
Norsten
Top achievements
Rank 1
Share this question
or