My Select statement calls all the fields - Select *
Then I use the Row DataBound Sub to modifiy the data in one of the fields. This iworks.
Then when trying to use sort or use filterexpression on that field, or sorting neither seem to work.
*************************************
Here is what I think is happening.
The original query retrieves all rows including the field I want to change called "Dist" which is "0" in every record.
Although the gridview shows the properly calculated new number in the "Dist" field, I think the sort routine must only look at the query value of distance which was "0" instead of the gridview value which is populated through the RowDataBound Sub
If this is true then the solution would be to do the distance calcuation within the SELECT statement using an AS statement. This seems to work but I cannot figure out how to put the 10 lines of calculations in the SELECT statement.. I tried using a VB Protected Function, but can't get it to work in the SELECT Statement either
AM I on the right track?
ANy Suggestions would be helpful
Thanks