473,396 Members | 1,809 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.

datagrid question


hi,

i have a templatecolum in my datagrid. the template contains
a hyperlink called "hypFind".

when i run my page and do View|Source each instance
of hypFind has a separate id like this: id="dgRooms__ctl2_hypFind",
id="dgRooms__ctl3_hypFind", id="dgRooms__ctl4_hypFind" etc..

my question is how can i get to this name programmatically in
the ItemDataBound routine???

thanks.

t.
Nov 17 '05 #1
2 2691
Try Control.ClientID.

I can't test this right now as I'm not in my environment, but I think it gives you the client ID that it generates for the control that you're interested it.

Chris
"Tariq Ahmad" <ta*********@hotmail.com> wrote in message news:eg**************@tk2msftngp13.phx.gbl...

hi,

i have a templatecolum in my datagrid. the template contains
a hyperlink called "hypFind".

when i run my page and do View|Source each instance
of hypFind has a separate id like this: id="dgRooms__ctl2_hypFind",
id="dgRooms__ctl3_hypFind", id="dgRooms__ctl4_hypFind" etc..

my question is how can i get to this name programmatically in
the ItemDataBound routine???

thanks.

t.
Nov 17 '05 #2

works a treat - thanks!

"Chris McKenzie" <ta*****@charter.net> wrote in message news:ec**************@TK2MSFTNGP10.phx.gbl...
Try Control.ClientID.

I can't test this right now as I'm not in my environment, but I think it gives you the client ID that it generates for the control that you're interested it.

Chris
"Tariq Ahmad" <ta*********@hotmail.com> wrote in message news:eg**************@tk2msftngp13.phx.gbl...

hi,

i have a templatecolum in my datagrid. the template contains
a hyperlink called "hypFind".

when i run my page and do View|Source each instance
of hypFind has a separate id like this: id="dgRooms__ctl2_hypFind",
id="dgRooms__ctl3_hypFind", id="dgRooms__ctl4_hypFind" etc..

my question is how can i get to this name programmatically in
the ItemDataBound routine???

thanks.

t.
Nov 17 '05 #3

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

Similar topics

0
by: Luna | last post by:
Hi I wanted to ask anyone if they have done anything silimar to this.. I have the following code to highlight the entire row when any cell of the datagrid is clicked.. Private Sub...
1
by: Bob1739 | last post by:
I have an Windows form app which receives data thru an external app. An event is raised in my app, some event handler code takes the data an puts it into a dataset. The dataset is bound to a...
5
by: AC | last post by:
Any reason i'm having trouble with: DataGrid1.Columns(7).ItemStyle.HorizontalAlign = HorizontalAlign.Right I'm trying to directly set the column alignment of a datagrid created at runtime.. ...
3
by: DC | last post by:
Dear ASP.Net Experts, In ASP, I can write something like this: <table> <tr> <th align=left>ID</th> <th align=left>Product Name</th> <th align=left>Price</th> </tr> <%
2
by: itgMan | last post by:
hello friends, i have a question about datagrid, i have binded a datagrid with a datatable from values that came from a comma seperated values (.CSV) file i have created textboxes in all...
3
by: Bob Taylor | last post by:
Hi everybody, I have a question about the datagrid. I have a datagrid and I have set the datasource property to equal a dataset. the datagrid fills up with the columns (prodno, description,...
2
by: Arsalan | last post by:
Is it possible to make a DataGrid containing other controls, for e.g checkbox or combo box ?? Is it possible to directly edit those DataGrid which are bound to Data set
3
by: Lars Netzel | last post by:
(applies to Windows Form .NET 2003) I'm filling a datagrid from a Datatable and applying a DataGridStyle. The Source Fields are "Name", "Value", "Locked" and the Style's Columns are "Name",...
1
by: amber | last post by:
I have a form, with multiple tabs. Each tab contains 1 datagrid except for the last tab which contains 2 datagrids. I have a toolbar that I use for the entire form. When the 'delete' button is...
5
by: rn5a | last post by:
In my application, I want to populate all the directories & files existing in a directory on the server in a DataGrid. To ensure that all the directories get listed first followed by all the files,...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.