Bonjour,

J'ai 2 gridview générés dynamiquement qui ont chacun un total (float) .
Je souhaite afficher la somme de ces 2 totaux dans un libellé mais je n'arrive pas à convertir en string la somme de ces 2 float :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 float total_gen = float.Parse(((Label)this.PAUSE_GRIDVIEW.FooterRow.Cells[3].Controls[0]).Text)+float.Parse(((Label)this.PLATEAU_GRIDVIEW.FooterRow.Cells[3].Controls[0]).Text); 
 MONTANT_TOTAL.Text = total_gen.ToString();
pour ce code j'ai l'erreur "Input string was not in a correct format. "


Si j'affiche directement sans faire de somme, j'affiche pourtant bien le total1 dans le libellé :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
MONTANT_TOTAL.Text = ((Label)this.PAUSE_GRIDVIEW.FooterRow.Cells[3].Controls[0]).Text;
Auriez-vous une idée du problème ?

Merci d'avance.