Finds an item given its path.
Type | Description | |||
Path as String | A string expression that indicates the item's path | |||
HITEM | A long expression that indicates the item's handle that matches the criteria. |
The FindPath property searches the item on the column SearchColumnIndex. Use the FullPath property in order to get the item's path. Use the FindItem to search for an item.
The following VB sample selects the item based on its path:
Grid1.Items.SelectItem(Grid1.Items.FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder")) = True
The following C++ sample selects the item based on its path:
#include "Items.h" CItems items = m_grid.GetItems(); COleVariant vtMissing; long hFind = items.GetFindPath( "Files and Folders\\Hidden Files and Folders\\Do not show hidden files and folder" ); if ( hFind != NULL ) items.SetSelectItem( hFind, TRUE );
The following VB.NET sample selects the item based on its path:
With AxGrid1.Items Dim iFind As Integer iFind = .FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder") If Not (iFind = 0) Then .SelectItem(iFind) = True End If End With
The following C# sample selects the item based on its path:
int iFind = axGrid1.Items.get_FindPath("Files and Folders\\Hidden Files and Folders\\Do not show hidden files and folder"); if ( iFind != 0 ) axGrid1.Items.set_SelectItem(iFind, true);
The following VFP sample selects the item based on its path:
with thisform.Grid1.Items .DefaultItem = .FindPath("Files and Folders\Hidden Files and Folders\Do not show hidden files and folder") if ( .DefaultItem <> 0 ) .SelectItem( 0 ) = .t. endif endwith