473,385 Members | 1,474 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,385 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 2689
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
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.