It would be more efficient if you return your computed column as part of
query resultset and simply bind hyperlink to the column. Or you can use
DataGrid_ItemDataBound event where you can get value of the current column
and manually bind hyperlink to the result of your function based on this
parameter.
--
Programmer
"Jl_G_0" wrote:
Quote:
>
Found out a solution.
>
Created a Function (Public) and it executes the ExecuteScalar with a
parameter as variable. This variable is the parameter of the SQL
String.
>
Public Function readBase(Param As String)
conecBases.Open()
yComan.Parameters.AddWithValue("@choose", Param)
yAnswer = yComan.ExecuteScalar()
yComan.Parameters.Clear()
conecBases.Close()
return yAnswer
End Function
>
---------------------
>
On the datagrid - TemplateColumn:
<ItemTemplate>
<%# readBase(DataBinder.Eval(Container.DataItem,"Name" )) %>
</ItemTemplate>
>
I dont know very well how to use DataBinder.Eval ... but I know that it
worked fine.
>
If anyone knows a good tutorial so I can learn more about it, please
post. Thx.
>
>