Click here to Skip to main content
16,011,374 members
Home / Discussions / C#
   

C#

 
GeneralRe: Looping through Dataset instead of DataGridView Pin
Som Shekhar10-Mar-10 18:13
Som Shekhar10-Mar-10 18:13 
GeneralRe: Looping through Dataset instead of DataGridView Pin
Eagle3211-Mar-10 12:02
Eagle3211-Mar-10 12:02 
GeneralRe: Looping through Dataset instead of DataGridView Pin
Som Shekhar11-Mar-10 18:06
Som Shekhar11-Mar-10 18:06 
QuestionClass properties - how to change values from form Pin
peropata10-Mar-10 10:32
peropata10-Mar-10 10:32 
AnswerRe: Class properties - how to change values from form Pin
Dan Mos10-Mar-10 10:44
Dan Mos10-Mar-10 10:44 
GeneralRe: Class properties - how to change values from form Pin
peropata10-Mar-10 11:46
peropata10-Mar-10 11:46 
GeneralRe: Class properties - how to change values from form Pin
Dan Mos10-Mar-10 12:10
Dan Mos10-Mar-10 12:10 
GeneralRe: Class properties - how to change values from form Pin
peropata10-Mar-10 19:54
peropata10-Mar-10 19:54 
I found the problem. It was my mistake in creating objects. I was creating object MyGraphGridClass inside one of the method of MyDivisionClass and as such it was destroyed as soon as it left that method and its properties could not be accessed. I rearranged a code and put the declaration (creation) of my object as one of the properties of my MyDivisionClass, so I can access its properties.

class MyGraphGridClass
    {
        private int myProperty;

        public int Property
        {
            get { return myProperty; }
            set { myProperty = value; }
        }

        .
        .
        .

    }

    class MyDivisionClass
    {
        private MyGraphGridClass objMyGraphGrid = new MyGraphGridClass();

        internal MyGraphGridClass MyGraphGrid
        {
            get { return objMyGraphGrid; }
            set { objMyGraphGrid = value; }
        }

        .
        .
        .

    }

// In chid form class 

       MyDivisionClass Graph_01 = new MyDivisionClass();
       MyDivisionClass Graph_02 = new MyDivisionClass();

       Graph_01.MyGraphGrid.Property = 5;
       Graph_02.MyGraphGrid.Property = 3;
       
       // and then use as suggested
       SetupForm sf = new SetupForm(Graph_01.MyGraphGrid);


Pata
QuestionC# dataset/adapter connection Pin
2010JohnFByers10-Mar-10 9:50
2010JohnFByers10-Mar-10 9:50 
AnswerRe: C# dataset/adapter connection Pin
Dan Mos10-Mar-10 10:09
Dan Mos10-Mar-10 10:09 
GeneralRe: C# dataset/adapter connection Pin
2010JohnFByers10-Mar-10 11:16
2010JohnFByers10-Mar-10 11:16 
GeneralRe: C# dataset/adapter connection Pin
Dan Mos10-Mar-10 11:30
Dan Mos10-Mar-10 11:30 
QuestionSet the SelectedItem of a populated DataGridViewComboBoxCell Pin
Member 226514810-Mar-10 7:44
Member 226514810-Mar-10 7:44 
QuestionCreating a list of complex object from two lists [modified] Pin
dan!sh 10-Mar-10 6:58
professional dan!sh 10-Mar-10 6:58 
AnswerRe: Creating a list of complex object from two lists Pin
masoumeh201010-Mar-10 7:16
masoumeh201010-Mar-10 7:16 
AnswerRe: Creating a list of complex object from two lists Pin
Dan Mos10-Mar-10 7:29
Dan Mos10-Mar-10 7:29 
GeneralRe: Creating a list of complex object from two lists Pin
dan!sh 10-Mar-10 7:45
professional dan!sh 10-Mar-10 7:45 
AnswerRe: Creating a list of complex object from two lists Pin
Keith Barrow10-Mar-10 9:23
professionalKeith Barrow10-Mar-10 9:23 
GeneralRe: Creating a list of complex object from two lists Pin
Dan Mos10-Mar-10 10:26
Dan Mos10-Mar-10 10:26 
GeneralRe: Creating a list of complex object from two lists Pin
dan!sh 10-Mar-10 16:56
professional dan!sh 10-Mar-10 16:56 
QuestionHow installer can call non-System account action? Pin
dims1210-Mar-10 6:03
dims1210-Mar-10 6:03 
QuestionHow to use CutePDF Writer programmatically Pin
NarVish10-Mar-10 5:53
NarVish10-Mar-10 5:53 
AnswerRe: How to use CutePDF Writer programmatically Pin
JHizzle10-Mar-10 6:01
JHizzle10-Mar-10 6:01 
QuestionHow to top Visual Studio 2005 Designer from modifying my custom control! Pin
Matthew Klein10-Mar-10 5:28
Matthew Klein10-Mar-10 5:28 
AnswerRe: How to top Visual Studio 2005 Designer from modifying my custom control! Pin
The Man from U.N.C.L.E.10-Mar-10 5:52
The Man from U.N.C.L.E.10-Mar-10 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.