cannot find control in usercontrol

2 posts, 0 answers
  1. Bevis
    Bevis avatar
    8 posts
    Member since:
    Jan 2011

    Posted 09 Feb 2012 Link to this post

    Hi,

    I have an usercontrol as an editformcontrol in a radgrid.  It has some comboboxes, textboxes etc.  Now I have problem to find the controls to set and get values.  When I debug, somehow I saw the ClientID as below which the clt05/clt09 changes for different rows.

    RadPanelBar1_i1_grdRevenue_ctl00_ctl05_EditFormControl_drp_chg_cd
    RadPanelBar1_i1_grdRevenue_ctl00_ctl09_EditFormControl_drp_chg_cd

    How can I find the controls in javascript using code like $find('<%= drp_chg_cd.ClientID %>')

    Thanks,

  2. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 13 Feb 2012 Link to this post

    Bevis:

    Since your comboboxes and textboxes are embedded in the RadGrid EditForm Control, you'll need to use the findControl method to get a handle on them. Also, see this page for some insights:

    Finding combobox on the client-side when it is embedded in another control

    Hope this helps!
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top