Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > GridView & Labels ?

Reply
Thread Tools

GridView & Labels ?

 
 
Mr. Murad Jamal
Guest
Posts: n/a
 
      06-07-2006
I have a GridView Control, I added a label to each cell,
how can i access that label from Code Behind ?

Thank you in advance !
 
Reply With Quote
 
 
 
 
Jan Hyde
Guest
Posts: n/a
 
      06-07-2006
Mr. Murad Jamal <(E-Mail Removed)>'s
wild thoughts were released on Wed, 7 Jun 2006 01:08:02
-0700 bearing the following fruit:

>I have a GridView Control, I added a label to each cell,
>how can i access that label from Code Behind ?
>
>Thank you in advance !


Are you talking about template fields columns?

If so then RowDataBound event you can get at your label with
code something like this

Dim lbl As Label

If e.Row.RowType = DataControlRowType.DataRow Then
lbl = e.Row.FindControl("TheNameOfTheLabelIWant")
Endif



Jan Hyde (VB MVP)

--
Christmas is the time of year when mother has to separate the men from the toys.

(Leopold Fechtner)

 
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
"pointlabel"-like function for Python: distribute text labels on a2-d scatter plot to avoid overlapping labels C Barrington-Leigh Python 1 09-12-2010 09:58 PM
how to connect 2 labels in gridview to two different sqldatasources? Luc ASP .Net 3 09-22-2009 02:20 PM
Gridview control will not wrap text in ItemTemplate Labels Keithb ASP .Net 0 11-04-2006 12:28 AM
GridView & Labels ? =?Utf-8?B?TXIuIE11cmFkIEphbWFs?= ASP .Net 1 06-07-2006 08:36 AM
Timing of updating labels and GridView after a SQLDataSource read Michael Kellogg ASP .Net 0 04-06-2006 08:19 PM



Advertisments