Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Get Gridview current field value (http://www.velocityreviews.com/forums/t727066-get-gridview-current-field-value.html)

Mark B 07-01-2010 03:11 AM

Get Gridview current field value
 
I have a Gridview template field 'Color'.

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

<%=fGetColorStringFromCounterIDLookup(intCurrentCo unterID) %>

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.




Mark B 07-01-2010 03:48 AM

Re: Get Gridview current field value
 

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@none.com> wrote in message
news:eaw2UsMGLHA.5856@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(intCurrentCo unterID) %>
>
> 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.
>
>
>




All times are GMT. The time now is 08:05 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.