473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dim lblTimeleft As Label = CType(e.Row.Cells(9).FindControl("lblTimeleft"), Label)

Hi guys,

I'm a bit of a newbie, but know VB Classic quite well. The above statement
appears in some code I'm hacking, and I have added a column to the DataGrid
(in the middle, so those to the right have had their index upped by one).
Yet the statement above seems to still return the same value.

Is the Index value (9) in the statement :

CType(e.Row.Cells(9).FindControl("lblTimeleft"), Label)

doing anything, or is the call simply going to the row, and picking the
control from there ?

Thanks in advance

Jun 27 '08 #1
2 2789
On 8 May, 15:40, "Jethro" <jethro...@hotmail.comwrote:
Hi guys,

I'm a bit of a newbie, but know VB Classic quite well. The above statement
appears in some code I'm hacking, and I have added a column to the DataGrid
(in the middle, so those to the right have had their index upped by one).
Yet the statement above seems to still return the same value.

Is the Index value (9) in the statement :

*CType(e.Row.Cells(9).FindControl("lblTimeleft"), Label)

doing anything, or is the call simply going to the row, and picking the
control from there ?

Thanks in advance
bump
Jun 27 '08 #2
"Jethro" <je*******@hotmail.comschrieb
On 8 May, 15:40, "Jethro" <jethro...@hotmail.comwrote:
Hi guys,

I'm a bit of a newbie, but know VB Classic quite well. The above
statement appears in some code I'm hacking, and I have added a
column to the DataGrid (in the middle, so those to the right have
had their index upped by one). Yet the statement above seems to
still return the same value.

Is the Index value (9) in the statement :

CType(e.Row.Cells(9).FindControl("lblTimeleft"), Label)

doing anything, or is the call simply going to the row, and picking
the control from there ?

Thanks in advance
Sorry, no answer, but you should give some more information. What is e?
Where is the code located? By searching for "findcontrol" I get 5
results. Which one is it? "Cells" give 4 results. Hmmm... Ok, 3 out of 5
are "protected", so 2 are remaining..... After combining the results,
it's probably

System.Web.UI.Control.FindControl(ByVal String) As
System.Web.UI.Control

Right? Pretty much to do for a reader before being able to understand
the question. :-)
Armin

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Xerxes | last post by:
Hi, can you tell me how I can make a <label> hidden? I have hidden the field after the label: var M_Hide = isNS4?'hide':'hidden'; var M_Show = isNS4?'show':'visible'; ..... <label...
10
by: Steve | last post by:
I'm not sure if I should be using tables here to structure the layout or if CSS is okay. I have a data entry form in which I have floated the labels to one side, and given them a specific width....
3
by: TR | last post by:
Is it possible with CSS to prevent this wrapping alignment with a checkbox with a nested label? This is the label of the checkbox that wraps beneath it I'd prefer it looked like...
2
by: knoak | last post by:
Hi there, In my form, after validation, labels of wrong fields are turned into a red color. What i want now is when you hit 'reset', to make all the labels grey again. I have the next code:...
4
by: Shapper | last post by:
Hello, I have a label as follows: <label id="lName" for="name">Name:<input type="text" id="name"></input></label> I need to declare the label in my page.aspx.vb so I can access it on page...
31
by: jcrouse | last post by:
Is there a quick and easy way to change the color of a label controls border from the default black to white? Thank you, John
5
by: ReavenK | last post by:
I was doing a tutorial on inline assemble tricks for C and C++ when I came upon a little detail that I can't figure out. I was doing a test program to test out a concept which seems like it should...
2
by: rn5a | last post by:
Consider the following code: <script runat="server"> Sub ShowData(obj As Object, ea As EventArgs) lblDate.Text = DateTime.Now.ToString("d") lblDate.DataBind() End Sub </script> <form...
4
by: pradeep | last post by:
how to set input type label's value through javascript
0
by: Guilherme Polo | last post by:
On Wed, Sep 3, 2008 at 8:57 PM, Kevin McKinley <kem1723@yahoo.comwrote: Come on.. "help on lines 384-403", that is not a good way to look for help. You are supposed to post some minimal code that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.