Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 can't find the column AVG. I cant seem to find a workaround to this situation. Anyone know of a solution.

 

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...