Welcome Guest Search | Active Topics | Sign In | Register

Javascript does not find the controls in dialog content template Options
Ramy
Posted: Wednesday, March 7, 2012 2:12:36 AM
Rank: Member
Groups: Member

Joined: 3/8/2011
Posts: 19
I have a grid column remarks which can be very long, so i have added a dialog and in that added a label control. On click of grid item, by javascript i am trying to open the dialog and put the value of grid item to the label in dialog. but javascript can not find the label by its id, it is returning null.

Please help
eo_support
Posted: Wednesday, March 7, 2012 8:23:39 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You will need to use the full client ID of the Label control. The Label is inside the dialog so the dialog's ID is included in the Label control as well. You can use the following code to find the full ID of the Label control:

Code: C#
Dialog1.ContentContainer.FindControl("Label1").ClientID


Hope this helps.

Thanks!
Ramy
Posted: Thursday, March 8, 2012 12:08:27 AM
Rank: Member
Groups: Member

Joined: 3/8/2011
Posts: 19
But I am doing this from client side, how to get the label id from javascript
eo_support
Posted: Thursday, March 8, 2012 8:25:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We give you the server side code only to demonstrate the logic behind this. You will need to write the code for your own particular scenario.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.