ASP.Net GridView Footer Total Error: specified cast is not valid

Last Reply 6 months ago By Andrea

Posted 6 months ago

here is raising exception specified cast is not valid when i calculation gridview footer column total

 GVEAtt.Columns[6].FooterText=objdt.Tables[0].AsEnumerable().Select(x => x.Field<double>("Days"))

HTML column 

<asp:TemplateField HeaderText="Days">
        <asp:TextBox ID="txtDays" runat="server"  Width="50" Text='<%# Bind("Days") %>' > </asp:TextBox>

Please guide thanks

You are viewing reply posted by: Andrea 6 months ago.
Posted 6 months ago
Hi @akhter,
Please try the following

Invalid cast error for float value in displaying sum of column total in GridView Footer in ASP.Net

It might help you.

Cheers Andrea.