Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Get Gridview current field value

Reply
Thread Tools

Get Gridview current field value

 
 
Mark B
Guest
Posts: n/a
 
      07-01-2010
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.



 
Reply With Quote
 
 
 
 
Mark B
Guest
Posts: n/a
 
      07-01-2010

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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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.
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
Copy File Field Value to Dynamic File Field Value VUNETdotUS Javascript 25 11-10-2007 10:36 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
Newbie problem - Changing Gridview field value (i.e. calculate a value) before clicking update VS2005 ASPX AAJ ASP .Net 0 09-06-2006 08:31 AM
Gridview - Accessing a field value in current row Joe Reiss ASP .Net Web Controls 3 01-04-2006 07:44 PM



Advertisments