Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
(Using Teleriks' RadPageView)
I have a Method inside a usercontrol which creates and populates a "RadPageView".
        public void CreateDemoMap()
            RadPageViewPage pTest = new RadPageViewPage();
            pTest.Text = "Live Map (Demo)";
            WebMap wMap = new WebMap();
From the same form but outside of the user control I have a button calling on the Method.
private void radButtonElement4_Click_1(object sender, EventArgs e)
    ProjectDashControl PDC = new ProjectDashControl();
The method does run (Textbox Shows "Test") But the RadPageView does not generate.
Running the method localy - I get the intended results and it works fine.
public ProjectDashControl()
So I'm not sure how to fix this; or for that matter what the issue is; Is the instance i'm creating taking presedence over the latter? Not running with-in the form? Suggestions or Answers Appreciated - Thanks in Advance.
Posted 17-Jun-11 6:11am
SAKryukov at 17-Jun-11 14:34pm
Not ***fully*** running?!! This is the first time I hear about such a weird concept!
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You have to move variable ProjectDashControl PDC to global scope of your class or else GC will collect PDC when the method radButtonElement4_Click_1 ends.
RaiinMedia at 20-Jun-11 11:02am
This unfortunatly doesnt work, It still shows a MessageBox. But doesn't create the RadPage.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Moved Variable ProjectDashControl PDC to Global Scope and Changed to Instance.

ProjectDashControl PDC = ProjectDashControl.Instance();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 475
1 OriginalGriff 425
2 Sascha Lefévre 289
3 CPallini 285
4 CHill60 260
0 Sergey Alexandrovich Kryukov 9,773
1 OriginalGriff 9,290
2 Peter Leow 5,137
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,036

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 27 Jun 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100