Class
GridViewSearchRowInfo

Represents the data row associated with the search functionality of RadGridView.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

cs-api-definition
public class GridViewSearchRowInfo : GridViewSystemRowInfo, IDataItem, IHierarchicalRow, INotifyPropertyChanged, INotifyPropertyChangingEx, IDisposable, IComparable<GridViewSystemRowInfo>, IGridViewEventListener

Inheritance: objectGridViewRowInfoGridViewSystemRowInfoGridViewSearchRowInfo

Implements: IComparable<GridViewSystemRowInfo>IDataItemIDisposableIGridViewEventListenerIHierarchicalRowINotifyPropertyChangedINotifyPropertyChangingEx

Inherited Members GridViewSystemRowInfo.IsSystemGridViewSystemRowInfo.IndexGridViewSystemRowInfo.RowPositionGridViewSystemRowInfo.ParentGridViewRowInfo.IsAttachedStateGridViewRowInfo.IsModifiedStateGridViewRowInfo.IsCurrentStateGridViewRowInfo.IsSelectedStateGridViewRowInfo.IsExpandedStateGridViewRowInfo.IsVisibleStateGridViewRowInfo.AllowResizeStateGridViewRowInfo.SuspendNotificationsStateGridViewRowInfo.IsInitializedStateGridViewRowInfo.LastRowInfoStateGridViewRowInfo.stateGridViewRowInfo.SetParent(GridViewRowInfo)GridViewRowInfo.GetActualHeight(IGridView)GridViewRowInfo.InvalidateRow()GridViewRowInfo.EnsureVisible()GridViewRowInfo.EnsureVisible(bool)GridViewRowInfo.Delete()GridViewRowInfo.GetErrorText(string)GridViewRowInfo.HasChildRows()GridViewRowInfo.SuspendPropertyNotifications()GridViewRowInfo.ResumePropertyNotifications()GridViewRowInfo.FindParent<T>()GridViewRowInfo.Dispose()GridViewRowInfo.DispatchEvent(KnownEvents, GridEventType, GridEventDispatchMode, object, object[])GridViewRowInfo.GetEventInfo(GridPropertyChangedEventArgs, out GridEventDispatchMode)GridViewRowInfo.OnBeginEdit()GridViewRowInfo.OnEndEdit()GridViewRowInfo.OnPropertyChanging(PropertyChangingEventArgsEx)GridViewRowInfo.ClearCache()GridViewRowInfo.SetRowStateProperty<T>(string, ref T, T)GridViewRowInfo.SetBooleanProperty(string, int, bool)GridViewRowInfo.ErrorTextGridViewRowInfo.GroupGridViewRowInfo.ViewInfoGridViewRowInfo.ViewTemplateGridViewRowInfo.CellsGridViewRowInfo.TagGridViewRowInfo.DataBoundItemGridViewRowInfo.MinHeightGridViewRowInfo.MaxHeightGridViewRowInfo.HeightGridViewRowInfo.IsCurrentGridViewRowInfo.IsSelectedGridViewRowInfo.IsExpandedGridViewRowInfo.IsVisibleGridViewRowInfo.IsPinnedGridViewRowInfo.PinPositionGridViewRowInfo.IsOddGridViewRowInfo.AllowResizeGridViewRowInfo.HierarchyLevelGridViewRowInfo.ChildRowsGridViewRowInfo.HasChildViewsGridViewRowInfo.PropertyChangedGridViewRowInfo.PropertyChanging

Constructors

GridViewSearchRowInfo(GridViewInfo)

Initializes a new instance of the GridViewSearchRowInfo class.

Declaration

cs-api-definition
public GridViewSearchRowInfo(GridViewInfo viewInfo)

Parameters

viewInfo

GridViewInfo

The grid view info that this search row belongs to.

Properties

AllowedStates

Gets the allowed states for this search row. Search rows do not support any special states.

Declaration

cs-api-definition
public override AllowedGridViewRowInfoStates AllowedStates { get; }

Property Value

AllowedGridViewRowInfoStates

Overrides GridViewRowInfo.AllowedStates

AutomaticallySelectFirstResult

Gets or sets a value indicating whether the first found cell will be automatically selected and brought into view.

Declaration

cs-api-definition
public bool AutomaticallySelectFirstResult { get; set; }

Property Value

bool

Cancel

Gets or sets a value indicating whether the current search operation should be cancelled.

Declaration

cs-api-definition
public static bool Cancel { get; set; }

Property Value

bool

CaseSensitive

Gets or sets a value indicating whether search will be case sensitive or case insensitive.

Declaration

cs-api-definition
public bool CaseSensitive { get; set; }

Property Value

bool

CloseOnEscape

Gets or sets a value indicating whether to close the search row when escape key is pressed.

Declaration

cs-api-definition
public bool CloseOnEscape { get; set; }

Property Value

bool

CompareOptions

Gets or sets the CompareOptions that will be used for case insensitive searches.

Declaration

cs-api-definition
public CompareOptions CompareOptions { get; set; }

Property Value

CompareOptions

Culture

Gets or sets the culture that will be used for case insensitive searches.

Declaration

cs-api-definition
public CultureInfo Culture { get; set; }

Property Value

CultureInfo

CurrentResultIndex

Gets the index of the currently selected search result.

Declaration

cs-api-definition
public int CurrentResultIndex { get; }

Property Value

int

CurrentSearchResultsCount

Gets the current count of search results. This number changes as new results are found.

Declaration

cs-api-definition
public int CurrentSearchResultsCount { get; }

Property Value

int

DeferredSearch

Gets or sets a value indicating whether the grid will wait until the Enter key is pressed before it starts a search.

Declaration

cs-api-definition
public bool DeferredSearch { get; set; }

Property Value

bool

HighlightResults

Gets or sets a value indicating whether search results should be highlighted in the grid.

Declaration

cs-api-definition
public bool HighlightResults { get; set; }

Property Value

bool

InitialSearchResultsTreshold

Gets or sets a value indicating the number of results that will be returned one at a time by the search mechanism.

Declaration

cs-api-definition
public int InitialSearchResultsTreshold { get; set; }

Property Value

int

IsSearchAsync

Gets or sets a value indicating whether the search will be performed on a background thread (true) or on the main thread (false).

Declaration

cs-api-definition
public bool IsSearchAsync { get; set; }

Property Value

bool

IsSearchSuspended

Gets a value indicating whether the search functionality is suspended.

Declaration

cs-api-definition
public bool IsSearchSuspended { get; }

Property Value

bool

IsSearching

Gets a value indicating if there is an ongoing search operation at the moment.

Declaration

cs-api-definition
public bool IsSearching { get; }

Property Value

bool

RowElementType

Gets the type of the GridRowElement used to visualize this search row.

Declaration

cs-api-definition
public override Type RowElementType { get; }

Property Value

Type

Overrides GridViewRowInfo.RowElementType

SearchCriteria

Gets the current/last search criteria.

Declaration

cs-api-definition
public string SearchCriteria { get; }

Property Value

string

SearchDelay

Gets or sets a value indicating how long the grid will wait after a key is pressed until it starts a search operation.

Declaration

cs-api-definition
public int SearchDelay { get; set; }

Property Value

int

SearchFromCurrentPosition

Gets or sets a value indicating whether search will start from current position.

Declaration

cs-api-definition
public bool SearchFromCurrentPosition { get; set; }

Property Value

bool

SearchResultsGroupSize

Gets or sets a value indicating the number of search results that will be returned as a group after the InitialSearchResultsTreshold has been reached.

Declaration

cs-api-definition
public int SearchResultsGroupSize { get; set; }

Property Value

int

ShowClearButton

Gets or sets a value indicating whether to show the clear button in the search row.

Declaration

cs-api-definition
public bool ShowClearButton { get; set; }

Property Value

bool

ShowCloseButton

Gets or sets a value indicating whether to show the close button in the search row.

Declaration

cs-api-definition
public bool ShowCloseButton { get; set; }

Property Value

bool

Methods

CompareToSystemRowInfo(GridViewSystemRowInfo)

Compares this search row with another system row to determine the relative positioning.

Declaration

cs-api-definition
protected override int CompareToSystemRowInfo(GridViewSystemRowInfo row)

Parameters

row

GridViewSystemRowInfo

The system row to compare with.

Returns

int

An integer indicating the relative position of this row compared to the specified row.

Overrides GridViewSystemRowInfo.CompareToSystemRowInfo(GridViewSystemRowInfo)

CreateBackgroundWorker()

Creates and configures the background worker used for asynchronous search operations.

Declaration

cs-api-definition
protected virtual BackgroundWorker CreateBackgroundWorker()

Returns

BackgroundWorker

A configured BackgroundWorker instance for search operations.

CreatePagedTraverser(bool)

Creates a paged traverser for iterating through grid rows when paging is enabled.

Declaration

cs-api-definition
protected virtual IEnumerator CreatePagedTraverser(bool grouped)

Parameters

grouped

bool

Indicates whether the grid is grouped.

Returns

IEnumerator

An IEnumerator for paged row traversal.

CreateTraverser()

Creates a traverser for iterating through grid rows.

Declaration

cs-api-definition
protected virtual GridTraverser CreateTraverser()

Returns

GridTraverser

A GridTraverser configured for row traversal.

EnsurePageVisible(GridViewRowInfo)

Ensures that the page containing the specified row is visible when paging is enabled.

Declaration

cs-api-definition
protected virtual bool EnsurePageVisible(GridViewRowInfo row)

Parameters

row

GridViewRowInfo

The row to make visible.

Returns

bool

True if the page was changed; otherwise, false.

EnsureViewInfoVisible(GridViewRowInfo)

Ensures that the view containing the specified row is visible in hierarchical scenarios.

Declaration

cs-api-definition
protected virtual bool EnsureViewInfoVisible(GridViewRowInfo row)

Parameters

row

GridViewRowInfo

The row to make visible.

Returns

bool

True if the view was made visible; otherwise, false.

GetCellFormattedValue(GridViewRowInfo, GridViewColumn)

Gets the formatted value of a cell for search purposes.

Declaration

cs-api-definition
public virtual string GetCellFormattedValue(GridViewRowInfo row, GridViewColumn column)

Parameters

row

GridViewRowInfo

The row containing the cell.

column

GridViewColumn

The column containing the cell.

Returns

string

The formatted string value of the cell.

GetCurrentCellTraverserColumnIndex()

Gets the traverser column index of the current cell.

Declaration

cs-api-definition
protected virtual int GetCurrentCellTraverserColumnIndex()

Returns

int

The zero-based traverser column index of the current cell, or -1 if not found.

GetCurrentCellTraverserRowIndex()

Gets the traverser row index of the current cell.

Declaration

cs-api-definition
protected virtual int GetCurrentCellTraverserRowIndex()

Returns

int

The zero-based traverser row index of the current cell, or -1 if not found.

MatchesSearchCriteria(string, GridViewRowInfo, GridViewColumn)

Determines whether the specified cell matches the search criteria.

Declaration

cs-api-definition
protected virtual bool MatchesSearchCriteria(string searchCriteria, GridViewRowInfo row, GridViewColumn col)

Parameters

searchCriteria

string

The search criteria to match against.

row

GridViewRowInfo

The row containing the cell to check.

col

GridViewColumn

The column containing the cell to check.

Returns

bool

True if the cell matches the search criteria; otherwise, false.

OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event and handles specific property changes.

Declaration

cs-api-definition
protected override void OnPropertyChanged(PropertyChangedEventArgs e)

Parameters

e

PropertyChangedEventArgs

The event arguments containing property change information.

Overrides GridViewRowInfo.OnPropertyChanged(PropertyChangedEventArgs)

OnSearchProgressChanged(SearchProgressChangedEventArgs)

Raises the SearchProgressChanged event.

Declaration

cs-api-definition
protected virtual void OnSearchProgressChanged(SearchProgressChangedEventArgs e)

Parameters

e

SearchProgressChangedEventArgs

The SearchProgressChangedEventArgs instance containing the event data.

ReportSearchProgress(int, GridSearchResultCellInfo, GridSearchResultCellCollection)

Reports the progress of the search operation and updates the search results.

Declaration

cs-api-definition
protected virtual void ReportSearchProgress(int percent, GridSearchResultCellInfo resultCell, GridSearchResultCellCollection resultCells)

Parameters

percent

int

The completion percentage of the search operation.

resultCell

GridSearchResultCellInfo

A single search result cell to add to the results.

resultCells

GridSearchResultCellCollection

A collection of search result cells to add to the results.

ResumeSearch()

Resumes the search functionality after it has been suspended through the SuspendSearch() method.

Declaration

cs-api-definition
public void ResumeSearch()

ResumeSearch(bool)

Resumes the search functionality after it has been suspended through the SuspendSearch() method.

Declaration

cs-api-definition
public void ResumeSearch(bool performSearch)

Parameters

performSearch

bool

Indicates whether a search should be started after search is resumed.

Search(string)

Initiates a search operation with the specified criteria.

Declaration

cs-api-definition
public virtual void Search(string criteria)

Parameters

criteria

string

The search criteria to use.

SelectNextSearchResult()

Selects and navigates to the next search result in the collection.

Declaration

cs-api-definition
public virtual void SelectNextSearchResult()

SelectPreviousSearchResult()

Selects and navigates to the previous search result in the collection.

Declaration

cs-api-definition
public virtual void SelectPreviousSearchResult()

SetCurrent(GridSearchResultCellInfo)

Sets the current cell to the specified search result cell and ensures it's visible.

Declaration

cs-api-definition
protected virtual void SetCurrent(GridSearchResultCellInfo cell)

Parameters

cell

GridSearchResultCellInfo

The search result cell to set as current.

SetCurrent(GridSearchResultCellInfo, bool)

Sets the current cell to the specified search result cell, with optional thread-safe invocation.

Declaration

cs-api-definition
protected virtual void SetCurrent(GridSearchResultCellInfo cell, bool checkInvokeRequired)

Parameters

cell

GridSearchResultCellInfo

The search result cell to set as current.

checkInvokeRequired

bool

Indicates whether to check if invocation is required for thread safety.

SuspendSearch()

Suspends the search functionality. While suspended no searches will be started.

Declaration

cs-api-definition
public void SuspendSearch()

TraverseRows(DoWorkEventArgs)

Traverses through all rows in the grid to find matches for the search criteria.

Declaration

cs-api-definition
protected virtual void TraverseRows(DoWorkEventArgs e = null)

Parameters

e

DoWorkEventArgs

The DoWorkEventArgs instance containing the event data for background operations.

Events

SearchProgressChanged

Occurs when the search progress changes during a search operation.

Declaration

cs-api-definition
public event SearchProgressChangedEventHandler SearchProgressChanged

Event Value

SearchProgressChangedEventHandler