Yes but it doesn't make sense to put that in row data bound because you are iterating the entire grid for every row. For example, if your grid has 100 rows , your loop will run 10000 times. I guess it doesn;t really matter but I think it would be better in the page load.
I want to help with your new problem, but there isn't enough info, Also, if you open a new question for that, you'll probably get more responses since experts are always jumping on new questions.
pointeman
ASKER
I'll give you points because your solution works, but not in RowDataBound.