Pending Review
Last Updated: 13 Aug 2015 14:23 by Scott
ADMIN
Maria Ilieva
Created on: 10 Jun 2015 11:07
Category: Filter
Type: Feature Request
2
Change the RadFilter search algorithm from DFS to search the “closest" control algorithm
Change the RadFilter search algorithm from DFS to search the “closest" control algorithm
1 comment
Scott
Posted on: 10 Jun 2015 12:17
To provide a little bit of background on this issue:  If the FilterContainerID of a RadFilter matches more than one element on a page (e.g., a RadGrid within a user control on a page with multiple instances of that user control), it always picks the first one.

Other (probably better and more flexible) alternatives to changing the existing search method (which was my original suggestion):

1. Support the FilterContainerID being set to the UniqueID of the RadGrid.  One workaround suggested by Telerik support was to generate a Unique ID in code and set the RadFilter's FilterContainerID to this property, but that presents other problems.  For example, all of the codebehind that references that control (for databinding, etc.) would then have to do find the RadGrid indirectly since its ID will no longer compile.

Supporting the UniqueID is similar but cleaner to the workaround suggested, without the need jump through a bunch of hoops to generate a unique ID property and then more hoops to databind when a unique ID already exists: the UniqueID property.

2. Allow setting of the FilterContainer directly.  Most developers could continue to use the FilterContainerID, but for ambigous scenarios this would give the developer the ability to specify the exact control they are targeting.

Thanks for listening!