Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to force datagrid to display DataColumn caption
Message
De
23/12/2006 20:13:50
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
How to force datagrid to display DataColumn caption
Versions des environnements
Environment:
C# 1.1
Divers
Thread ID:
01179970
Message ID:
01179970
Vues:
148
The following code shows "Column1" as column caption.
Why ?

How to force DataGrid to display "Caption" as column caption ?
using System.Windows.Forms;
using System.Data;
static class Program    {
static void Main()        {
Application.Run(new Frm());
}    }

class Frm : Form {

public Frm() {
DataTable dt = new DataTable();
DataColumn column = new DataColumn();
column.Caption = "Caption";
dt.Columns.Add(column);
DataGrid dg= new DataGrid();
this.Controls.Add(dg);
dg.SetDataBinding(dt, "");
} }
Andrus
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform