Solved

Data Binding with label control

Posted on 2004-08-14
2
211 Views
Last Modified: 2010-04-15
I am creating a report screen then look like this :

ItemName      Quantity              ItemName     Quantity
A                       1                          D                4
B                       2
C                       3
--End of Page--

The data is not store in the database. Supposely that my application gets the data from a list or array, how do I do a data binding ?
0
Comment
Question by:MyQ2004
2 Comments
 

Accepted Solution

by:
scottlundstrom earned 50 total points
ID: 11806314
An example of simple data binding would be like this.

//Create array
string[] testArray = {"test1","test2","test3"};

//Bind the array to the test properity of a label control
label1.databindings.add("Text",testArray,"");

Hope this helps
-Scott
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question