CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    89

    Binding data to textbox

    Hi everybody,

    I'm trying to bind a class variable to a textbox.

    the data class looks like:

    Code:
        public class route
        {
            public string name { get; set; }
            public int adress { get; set; }
     
            public route()
            {
                name = "";
                adress = 0;
            }
        }
        public class adr
        {
            public int index { get; set; }
     
            public route r1 { get; set; }
            public route r2 { get; set; }
            public adr()
            {
                index = 0;
                r1 = new route();
                r2 = new route();
            }
        }
     
        public class para
        {
            public int i1 { get; set; }
            public int i2 { get; set; }
        }
     
        public class adrData
        {
            public string label { get; set; }
            public adr ad { get; set; }
            public para pa { get; set; }
        }
    When I try to bind f.e. ad.r1.name to a textbox text via designer, it offers only label, ad and pa for binding:

    Name:  Formatierung und erweiterte Bindung_2013-07-22_10-50-27.jpg
Views: 919
Size:  33.7 KB


    What am I missing here?

    Thnx adv for your answers.

    btw: I'm using VS2012 and .NET4.5
    Last edited by Wild Thing; July 22nd, 2013 at 06:10 AM.
    prepare that the light at the end of your tunnel is just a freight train coming your way - metallica

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured