datagrid question

  • Thread starter Thread starter Tariq Ahmad
  • Start date Start date
T

Tariq Ahmad

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.
 
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

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.
 
works a treat - thanks!

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

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.
 
Back
Top