all groups > dotnet jscript > february 2005 >
You're in the

dotnet jscript

group:

JScript and DataGrid How to get a reference to a control that is in the row X of a datagrid


JScript and DataGrid How to get a reference to a control that is in the row X of a datagrid SergioT
2/25/2005 5:56:38 PM
dotnet jscript: Hi

I am using asp.net and VB.net aand jscript my problem is with one textbox
created into a datagrid, the idea is sent to a funcion the name of the
textbox that is created into the datagrid

The Question is:
How can I send the name of a control that iss created into one datagrid to a
function?????
I did something like this
================
<EditItemTemplate>
<asp:TextBox id="txt_CodItem" runat="server"
Width="87px">0</asp:TextBox>

<IMG id="imgBuscar" onclick="javascript:fHelpItm('txt_CodItem',
'txtNomItem', true)" src="../Images/iconBuscar.jpg">

align="right">Cód</P>
</EditItemTemplate>
=====================
like you can see on the above's code I've try on two diferent ways, one with
an IMG and the other with a link and It does not work!!!

Aparently JavaScript thinks that "txt_CodItem" is not an object!!!!! just
because it becomes alive when the dataGrid goes to edit state


Please i really need help on this
Bye

Re: JScript and DataGrid How to get a reference to a control that is in the row X of a datagrid name
2/26/2005 5:00:54 AM
Look Buddy, there is no dataGrid in no Browser.

It is good old table.

-------------------------

Believe whatever hype you are told to believe but don't hurt the rest
and leave the public internet alone.

Why don't you go to one of your fascist bend over national sales meetings
to discuss how to screw the world best.

--------------------

It is a table, and stupid people like you are not invited, ok.

Y "iconBuscar" no es gran cosa. No me interesa.
Idiomas English or Spanish la misma. Get lost.




[quoted text, click to view]
Re: JScript and DataGrid How to get a reference to a control that is in the row X of a datagrid SergioT
2/26/2005 1:20:47 PM
For every one who look this, excuse me but this person is a sorrow to the
forum

[quoted text, click to view]


[quoted text, click to view]



[quoted text, click to view]

The brain spoke!!!!
f***k U

[quoted text, click to view]
what do u you have in your tiny brain? shit????
If you don't wanna help Shut the f**k off and respect the people jackass

Yo pregunte educadamente y esperaba lo mismo pedaso de gringo imbecil

[quoted text, click to view]

Re: JScript and DataGrid How to get a reference to a control that is in the row X of a datagrid bruce barker
2/28/2005 4:18:27 PM
if you look at the renderd html, you will see that the control id is
decorated with its parent controls names to make it unique. you can attach
on the click in the code behind (item event) and use the controls clientid
to get the full name, or pass this and munge this.id to the control name.

-- bruce (sqlwork.com)



[quoted text, click to view]
| Hi
|
| I am using asp.net and VB.net aand jscript my problem is with one textbox
| created into a datagrid, the idea is sent to a funcion the name of the
| textbox that is created into the datagrid
|
| The Question is:
| How can I send the name of a control that iss created into one datagrid to
a
| function?????
| I did something like this
| ================
| <EditItemTemplate>
| <asp:TextBox id="txt_CodItem" runat="server"
| Width="87px">0</asp:TextBox>
|
| <IMG id="imgBuscar" onclick="javascript:fHelpItm('txt_CodItem',
| 'txtNomItem', true)" src="../Images/iconBuscar.jpg">
|
| align="right">Cód</P>
| </EditItemTemplate>
| =====================
| like you can see on the above's code I've try on two diferent ways, one
with
| an IMG and the other with a link and It does not work!!!
|
| Aparently JavaScript thinks that "txt_CodItem" is not an object!!!!! just
| because it becomes alive when the dataGrid goes to edit state
|
|
| Please i really need help on this
| Bye
|
|

Re: JScript and DataGrid How to get a reference to a control that is in the row X of a datagrid SergioT
3/1/2005 10:13:07 AM
Hi Bruce

Yes I saw that, andd the problem was how to get the clienId and then use it
to add the "onclick" attribute to the image.

I solve it using the dataBound Event handler and it works fine

thanks for your time

[quoted text, click to view]

AddThis Social Bookmark Button