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

Last Reply 22 days ago By Andrea

Posted 22 days 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">
    <ItemTemplate>     
        <asp:TextBox ID="txtDays" runat="server"  Width="50" Text='<%# Bind("Days") %>' > </asp:TextBox>
    </ItemTemplate>
</asp:TemplateField>

Please guide thanks

You are viewing reply posted by: Andrea 22 days ago.
Posted 22 days 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.