This is a migrated thread and some comments may be shown as answers.
findControl returns first control matching the end of the id
1 Answer 11 Views
This is a migrated thread and some comments may be shown as answers.
LeBear
Top achievements
Rank 1
LeBear asked on 16 Nov 2011, 08:31 PM
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.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 21 Nov 2011, 12:16 PM
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.

Veli
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
Tags
Grid
Asked by
LeBear
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or