Bind String array to a TextBox : Data Bind TextBox « Database ADO.net « C# / C Sharp

C# / C Sharp
1. 2D Graphics
2. Collections Data Structure
3. Components
4. Database ADO.net
5. Development Class
6. Event
7. File Stream
8. GUI Windows Form
9. Language Basics
10. Network
11. Office
12. Regular Expressions
13. Services Event
14. Thread
15. Web Services
16. Windows
17. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
C# / C Sharp » Database ADO.net » Data Bind TextBoxScreenshots 
Bind String array to a TextBox

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

    public class Form1 : System.Windows.Forms.Form {
      private System.Windows.Forms.TextBox textBox1;
      private System.ComponentModel.Container components = null;

      public Form1() {
        InitializeComponent();
      }

      private void InitializeComponent(){
         this.textBox1 = new System.Windows.Forms.TextBox();
         this.SuspendLayout();

         this.textBox1.Location = new System.Drawing.Point(168);
         this.textBox1.Name = "textBox1";
         this.textBox1.Size = new System.Drawing.Size(14420);
         this.textBox1.TabIndex = 0;
         this.textBox1.Text = "textBox1";

         this.AutoScaleBaseSize = new System.Drawing.Size(513);
         this.ClientSize = new System.Drawing.Size(17636);
         this.Controls.Add(this.textBox1);
         this.Name = "Form1";
         this.Text = "Form1";
         this.Load += new System.EventHandler(this.Form1_Load);
         this.ResumeLayout(false);

      }
 
      static void Main() {
            Application.Run(new Form1());
      }

      private void Form1_Load(object sender, System.EventArgs e) {
         String[] names = new String[] {"A""B""C""D""E"};
         textBox1.DataBindings.Add("text", names, null);
      }
    }



           
       
Related examples in the same category
1. Bind Database table column to TextBox
2. DataView Binding to TextBox
w_w___w__.ja___va2___s___.__c__o___m___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.