Version

GetRecordFromDataItem Method

Gets the DataRecord associated with a specific item in the DataSource.
Syntax
'Declaration
 
Public Function GetRecordFromDataItem( _
   ByVal dataItem As Object, _
   ByVal recursive As Boolean _
) As DataRecord
public DataRecord GetRecordFromDataItem( 
   object dataItem,
   bool recursive
)

Parameters

dataItem
An object from the underlying data source
recursive
If true will check all descendant records as well.

Return Value

The associated DataRecord or null if not found.
Remarks
This may be an expensive operation depending on the size and structure of the data. The logic first checks all of the DataRecords at the root level and if a match is not found then checks all of the descendant records.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also