Locates the data source with the specified ID, searching upwards in the control hierarchy,
starting at the specified control.
Namespace:
Endeca.Web.UIAssembly: Endeca.Web (in Endeca.Web.dll) Version: 2.1.1.0 (2.1.1.620)
Syntax
C# |
---|
public static T FindDataSource<T>( string dataSourceId, Control relativeTo ) where T : class, IDataSource |
Visual Basic (Declaration) |
---|
Public Shared Function FindDataSource(Of T As {Class, IDataSource}) ( _ dataSourceId As String, _ relativeTo As Control _ ) As T |
Visual C++ |
---|
public: generic<typename T> where T : ref class, IDataSource static T FindDataSource( String^ dataSourceId, Control^ relativeTo ) |
Parameters
- dataSourceId
- Type: System..::.String
ID of the data source control to find.
- relativeTo
- Type: System.Web.UI..::.Control
Search upwards in the control hierarchy, starting at this control.
Type Parameters
- T
- Concrete type of the data source control to find.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentException | if dataSourceID is null or empty. |
System..::.InvalidOperationException | if a data source of the requested type could not be found |
System..::.ArgumentNullException | if relativeTo is null. |