I have a row which is calculated, its not bound to my sql database as are the others. I simply want to be able to click on this column and have it sort the values.
This is my code:
<asp:TemplateField HeaderText="AVG" SortExpression="AVG" >
<ItemTemplate>
<asp:Label id="AVG" Runat="Server" Text=<%# average(Convert.ToDecimal(Eval("H")), Convert.ToDecimal(Eval("AB"))) %> />
</ItemTemplate>
<FooterTemplate>
<asp:Label Text=<%# Get_TotalAvg() %> runat="Server" />
</FooterTemplate>
</asp:TemplateField>
The web page returns an error stating it cant find the column AVG. I cant seem to find a workaround to this situation. Anyone know of a solution.
Thanks
This is my code:
<asp:TemplateField HeaderText="AVG" SortExpression="AVG" >
<ItemTemplate>
<asp:Label id="AVG" Runat="Server" Text=<%# average(Convert.ToDecimal(Eval("H")), Convert.ToDecimal(Eval("AB"))) %> />
</ItemTemplate>
<FooterTemplate>
<asp:Label Text=<%# Get_TotalAvg() %> runat="Server" />
</FooterTemplate>
</asp:TemplateField>
The web page returns an error stating it cant find the column AVG. I cant seem to find a workaround to this situation. Anyone know of a solution.
Thanks