findControl returns first control matching the end of the id

2 posts, 0 answers
  1. LeBear
    LeBear avatar
    233 posts
    Member since:
    May 2006

    Posted 16 Nov 2011 Link to this post

    I'm doing a findControl to find a control inside a grid line.  I have multiple controls (Qty_fin and ReservedQty_fin).  If I do a findControl on Qty_fin, I might get the ReservedQty_fin control.  I worked around this by changing the id for Qty_fin, but wanted to pass this along.
  2. Veli
    Veli avatar
    2002 posts

    Posted 21 Nov 2011 Link to this post

    Hi Lebear,

    I believe you are referring to the javascript $telerik.findControl(container, id) function. As you have encountered, the control searches by comparing the end of the element IDs to the specified id parameter. Unfortunately, the current limitation to this approach is that it can mistakenly match controls with similar IDs if 2 or more controls have client IDs ending with the string specified by the id parameter. We are aware of this issue, but currently no better approach is available.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top