I have problems to get the data of a particular cell in my gridview i'm doing it this way :
double total = 0;
for (int i = 0; i < GridFactures.Rows.Count; i++)
total += Convert.ToDouble(GridFactures.Rows[i].Cells[6].Text.ToString());
lblTotalTTC.Text = "Montant total TTC : " + total;
The column in question is declared in my aspx file :
<asp:TemplateField HeaderText="Montant TTC">
<ItemTemplate>
<asp:Label ID="lblMontantTTC" runat="server" Text='<%#Eval("MontantTTC") %>'/>
</ItemTemplate>
</asp:TemplateField>
i'm sure this is always the sixth column i want to check.
i put a break and GridFactures.Rows[i].Cells[6].Text.ToString()always contains ""
nothing more ...
thanks for your help