I have a gridview that is binded to a SQLDatasource. When the gridview is Databound I have it updated the values in Column 17.
Basically that column is called "Health" and i have the query just returning "1" as the value... then I have the code behind doing a calculation and setting that cell to whatever the result is.
However when I try to sort by the new expression on the gridview in the webpage... IT sorts off of the Databound values ("1s") , I need it to sort off the next values which range from 0 to 15.
this is how I set the new value:
Any ideas on how to update the sortexression to recognize the new values?
- Matt
"If I must boast, I will boast of the things that show my weakness"
- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
Basically that column is called "Health" and i have the query just returning "1" as the value... then I have the code behind doing a calculation and setting that cell to whatever the result is.
However when I try to sort by the new expression on the gridview in the webpage... IT sorts off of the Databound values ("1s") , I need it to sort off the next values which range from 0 to 15.
this is how I set the new value:
Code:
e.Row.Cells(16).Text = Health
Any ideas on how to update the sortexression to recognize the new values?
- Matt
"If I must boast, I will boast of the things that show my weakness"
- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008