Click here to Skip to main content
16,007,809 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with pthread. Pin
One Stone15-Jun-05 2:48
One Stone15-Jun-05 2:48 
GeneralRe: Problem with pthread. Pin
Uwe Keim15-Jun-05 4:35
sitebuilderUwe Keim15-Jun-05 4:35 
GeneralRe: Problem with pthread. Pin
Tom Larsen15-Jun-05 5:06
Tom Larsen15-Jun-05 5:06 
GeneralIs it possible to have 3-tier design with BindingContext Pin
kakarato15-Jun-05 0:49
kakarato15-Jun-05 0:49 
GeneralRe: Is it possible to have 3-tier design with BindingContext Pin
Trance Junkie15-Jun-05 1:05
Trance Junkie15-Jun-05 1:05 
GeneralRe: Is it possible to have 3-tier design with BindingContext Pin
kakarato15-Jun-05 1:13
kakarato15-Jun-05 1:13 
GeneralRe: Is it possible to have 3-tier design with BindingContext Pin
Trance Junkie15-Jun-05 1:23
Trance Junkie15-Jun-05 1:23 
GeneralRe: Is it possible to have 3-tier design with BindingContext Pin
Marc Clifton15-Jun-05 1:37
mvaMarc Clifton15-Jun-05 1:37 
kakarato wrote:
Where DATA LAYER is a data class which is collection of the Field Name and Value only.

Yes. However, in your data class you'll need to implement properties for your fields. You class needs to implement [propertyName]Changed events for all your properties, and the property setters need to check if the value has changed and, if the xxxChanged event is not null, fire the event. Also, you need to initialize your fields usually.

If you don't do the event stuff, you won't get 2 way data binding.

Like this:

public class MyData
{
    protected string myText;
    public event EventHandler MyTextChanged;

    public string MyText
    {
        get {return myText;}
        set
        {
            myText=value;
            if (MyTextChanged != null)
            {
                MyTextChanged(this, EventArgs.Empty);
            }
        }
    }

    public MyData()
    {
        myText="Initial Value";
    }
}


I was going to write an article on "Intro to data binding" at some point!

Marc


My website

Latest Articles:
Undo/Redo Buffer
Memento Design Pattern
GeneralRe: Is it possible to have 3-tier design with BindingContext Pin
kakarato15-Jun-05 15:10
kakarato15-Jun-05 15:10 
GeneralUrgent c# web based ticket system ! Pin
Trance Junkie15-Jun-05 0:44
Trance Junkie15-Jun-05 0:44 
GeneralChecking email in Outlook Pin
angeltsoi15-Jun-05 0:32
angeltsoi15-Jun-05 0:32 
GeneralMultithreading Pin
Lekkie15-Jun-05 0:11
Lekkie15-Jun-05 0:11 
GeneralRe: Multithreading Pin
S. Senthil Kumar15-Jun-05 1:28
S. Senthil Kumar15-Jun-05 1:28 
GeneralRe: Multithreading Pin
Marc Clifton15-Jun-05 1:49
mvaMarc Clifton15-Jun-05 1:49 
QuestionPassing an int array by refеrence to a shell function - how? Pin
iliyang14-Jun-05 23:36
iliyang14-Jun-05 23:36 
AnswerRe: Passing an int array by refеrence to a shell function - how? Pin
jjansen14-Jun-05 23:55
jjansen14-Jun-05 23:55 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
iliyang15-Jun-05 0:20
iliyang15-Jun-05 0:20 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
jjansen15-Jun-05 0:39
jjansen15-Jun-05 0:39 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
iliyang15-Jun-05 1:13
iliyang15-Jun-05 1:13 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
jjansen15-Jun-05 2:11
jjansen15-Jun-05 2:11 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
iliyang15-Jun-05 2:24
iliyang15-Jun-05 2:24 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
jjansen15-Jun-05 2:36
jjansen15-Jun-05 2:36 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
iliyang15-Jun-05 2:54
iliyang15-Jun-05 2:54 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
jjansen15-Jun-05 3:28
jjansen15-Jun-05 3:28 
GeneralRe: Passing an int array by reference to a shell function - how? Pin
iliyang15-Jun-05 3:46
iliyang15-Jun-05 3:46 

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.