![]() |
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. |
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 11:40 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.