473,325 Members | 2,860 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,325 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 2682
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.