From: Mark B on
I have a Gridview template field 'Color'.

I want to set its Text value to the string result of the following function:

<%=fGetColorStringFromCounterIDLookup(intCurrentCounterID) %>

where intCurrentCounterID is the value of the particular row's field value
for the CounterID.

How can I pass the current CounterID number to that function?

I know <% #Eval(CounterID) %> gets the current CounterID but haven't been
able to set the syntax to pass that result to the function.



From: Mark B on

Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound

If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(6).Text = GridView1.DataKeys(e.Row.RowIndex).Value
End If

End Sub


"Mark B" <none123(a)none.com> wrote in message
news:eaw2UsMGLHA.5856(a)TK2MSFTNGP02.phx.gbl...
>I have a Gridview template field 'Color'.
>
> I want to set its Text value to the string result of the following
> function:
>
> <%=fGetColorStringFromCounterIDLookup(intCurrentCounterID) %>
>
> where intCurrentCounterID is the value of the particular row's field value
> for the CounterID.
>
> How can I pass the current CounterID number to that function?
>
> I know <% #Eval(CounterID) %> gets the current CounterID but haven't been
> able to set the syntax to pass that result to the function.
>
>
>