Listing richtextbox

Résolu
Dedel209 Messages postés 29 Date d'inscription samedi 31 janvier 2009 Statut Membre Dernière intervention 14 août 2014 - 3 juin 2013 à 20:39
Dedel209 Messages postés 29 Date d'inscription samedi 31 janvier 2009 Statut Membre Dernière intervention 14 août 2014 - 6 juin 2013 à 17:10
Bonsoir à tous,

Je dois effectuer un listing des formations présentent dans ma base de donnée.

De quelle façon pourrais-je procéder pour afficher ceci en utilisant un richtextbox SVP?

Formation

Cours 1

Matière A ----------- Prix X

Cours 2

Matière B ----------- Prix Y

Cours 3

Matière B ----------- Prix Z

Total cours: Total

Exemple:

Formation ProgrammationHTML

Anglais Technique pour Internet

Langue ------------- 20 EUR

Introduction à Internet

Informatique ------------ 20 EUR

Syntaxe HTML

Informatique ------------ 80 EUR

Total des cours: 120 EUR

Merci d'avance pour votre réponse.

2 réponses

Dedel209 Messages postés 29 Date d'inscription samedi 31 janvier 2009 Statut Membre Dernière intervention 14 août 2014
6 juin 2013 à 17:10
Voila la solution...Ça pourrait servir pour d'autres personnes pour avoir un affichage correct.

while (dataReader.Read())
                {
                    list.Add(String.Format("{0,-40} {1,-10} \t\t {2,-30}", dataReader["intitule"].ToString(), dataReader["libelle"].ToString(), dataReader["cout"].ToString()));
                }
3
cs_louis14 Messages postés 793 Date d'inscription mardi 8 juillet 2003 Statut Membre Dernière intervention 10 février 2021 8
4 juin 2013 à 09:31
Bonjour,
je te conseille d'aller la doc MSDN à ce sujet ou bien google est ton ami. un premier lien http://msdn.microsoft.com/fr-fr/library/vstudio/aa970779.aspx

louis
0
Rejoignez-nous