lolo70000
Messages postés8Date d'inscriptionvendredi 28 avril 2006StatutMembreDernière intervention20 juin 2006
-
19 juin 2006 à 14:32
cs_Bidou
Messages postés5487Date d'inscriptiondimanche 4 août 2002StatutMembreDernière intervention20 juin 2013
-
20 juin 2006 à 08:31
Bnjour tt le monde
alors , je travail avce les datagridview et voila mon code :
ystem.Windows.Forms.DataGridView DGV =
new System.Windows.Forms.
DataGridView();
System.Windows.Forms.DataGrid DG =
new System.Windows.Forms.
DataGrid();
System.Windows.Forms.DataGridTableStyle DGS =
new System.Windows.Forms.
DataGridTableStyle();
System.Windows.Forms.DataGridViewImageColumn DGI =
new System.Windows.Forms.
DataGridViewImageColumn();
System.Data.DataSet DS=
new
DataSet();
Connexion
cnx =
new
Connexion
();
dataGridView1.Columns.Add(imageColumn);
DGV.Columns.Add(DGI);
cnx.getConnexion().Open();
System.Data.SqlClient.SqlCommand command =
new
SqlCommand(
"select * from annonces_ventes_encheres", cnx.getConnexion());
System.Data.SqlClient.SqlDataAdapter DA=
new
SqlDataAdapter(command);
System.Data.SqlClient.SqlCommandBuilder CB =
new
SqlCommandBuilder(DA);
dgouttegattat
Messages postés129Date d'inscriptionmardi 22 novembre 2005StatutMembreDernière intervention30 décembre 20073 19 juin 2006 à 15:47
Bonjour,
C'est le DataGrid qui ne s'affiche pas ? Ça semble normal puisque tu ne fais rien avec : dans ton code, la variable DG est déclarée, mais tu ne t'en sers jamais.
Si c'est le DataGridView (variable DGV) qui ne s'affiche pas, il faut l'ajouter à la collection de contrôles de la Form dans laquelle tu veux l'afficher :
<hr />Controls.Add(DGV);<hr />
Et tu peux a priori supprimer l'appel à Show(), car le DataGridView sera affiché en même temps que la Form et tous ses contrôles.
cs_Bidou
Messages postés5487Date d'inscriptiondimanche 4 août 2002StatutMembreDernière intervention20 juin 201361 20 juin 2006 à 08:31
Salut,
C'est parce que tu es dans une application web!
Et qu'ici, c'est plutôt un forum sur les questions WinForm...
Va plutôt poser ta question sur le forum d'ASP