ClientID using ProxyManager and CustomDirectEvents

  1. #1

    ClientID using ProxyManager and CustomDirectEvents

    I am adding a Label control dynamically in codebehind and trying to add a click event to it. When I try #1 it works but #2 has no effect. Without having to construct the ClientID manually please give me a better way to write this code.

    #1) DocProxyManager.CustomDirectEvents.Add(New Ext.Net.DirectEvent("centerPlaceHolder_TemplateAut horing_" + lblSectionHeading.ClientID, HtmlEvent.Click, New Ext.Net.ComponentDirectEvent.DirectEventHandler(Ad dressOf UpdateFields)))

    #2) DocProxyManager.CustomDirectEvents.Add(New Ext.Net.DirectEvent(lblSectionHeading.ClientID, HtmlEvent.Click, New Ext.Net.ComponentDirectEvent.DirectEventHandler(Ad dressOf UpdateFields)))
  2. #2
    You have to add label to Controls/Items collection first before using ClientID
  3. #3
    I am adding the label to a panel's item collection but it still does not work. Do I have the Add syntax correct for CustomDirectEvents?
  4. #4
    You can close this thread I see now when ClientID's are created

Similar Threads

  1. [1.2] ClientID of dynamic control changes
    By michaeld in forum 1.x Help
    Replies: 1
    Last Post: Oct 02, 2011, 11:08 AM
  2. [CLOSED] ListView ClientID differente
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 04, 2011, 10:57 AM
  3. [CLOSED] ClientID inside DirectEvents
    By krzak in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 01, 2011, 10:32 AM
  4. [CLOSED] CustomDirectEvents in UpdatePanel not refreshing
    By joeRobee in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 15, 2010, 12:37 AM
  5. Grid ClientID Error
    By kumarxlnt in forum 1.x Help
    Replies: 0
    Last Post: Oct 29, 2009, 4:27 AM

Posting Permissions