ClassGridViewSearchRowInfo
Represents the data row associated with the search functionality of RadGridView.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class GridViewSearchRowInfo : GridViewSystemRowInfo, IDataItem, IHierarchicalRow, INotifyPropertyChanged, INotifyPropertyChangingEx, IDisposable, IComparable<GridViewSystemRowInfo>, IGridViewEventListener
Inheritance: objectGridViewRowInfoGridViewSystemRowInfoGridViewSearchRowInfo
Implements:
Inherited Members
Constructors
GridViewSearchRowInfo(GridViewInfo)
Initializes a new instance of the GridViewSearchRowInfo class.
Declaration
public GridViewSearchRowInfo(GridViewInfo viewInfo)
Parameters
viewInfo
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
public override AllowedGridViewRowInfoStates AllowedStates { get; }
Property Value
Overrides
AutomaticallySelectFirstResult
Gets or sets a value indicating whether the first found cell will be automatically selected and brought into view.
Declaration
public bool AutomaticallySelectFirstResult { get; set; }
Property Value
Cancel
Gets or sets a value indicating whether the current search operation should be cancelled.
CaseSensitive
Gets or sets a value indicating whether search will be case sensitive or case insensitive.
CloseOnEscape
Gets or sets a value indicating whether to close the search row when escape key is pressed.
CompareOptions
Gets or sets the CompareOptions that will be used for case insensitive searches.
Declaration
public CompareOptions CompareOptions { get; set; }
Property Value
Culture
Gets or sets the culture that will be used for case insensitive searches.
CurrentResultIndex
Gets the index of the currently selected search result.
CurrentSearchResultsCount
Gets the current count of search results. This number changes as new results are found.
DeferredSearch
Gets or sets a value indicating whether the grid will wait until the Enter key is pressed before it starts a search.
HighlightResults
Gets or sets a value indicating whether search results should be highlighted in the grid.
InitialSearchResultsTreshold
Gets or sets a value indicating the number of results that will be returned one at a time by the search mechanism.
Declaration
public int InitialSearchResultsTreshold { get; set; }
Property Value
IsSearchAsync
Gets or sets a value indicating whether the search will be performed on a background thread (true) or on the main thread (false).
IsSearchSuspended
Gets a value indicating whether the search functionality is suspended.
IsSearching
Gets a value indicating if there is an ongoing search operation at the moment.
RowElementType
Gets the type of the GridRowElement used to visualize this search row.
Declaration
public override Type RowElementType { get; }
Property Value
Overrides
SearchCriteria
Gets the current/last search criteria.
SearchDelay
Gets or sets a value indicating how long the grid will wait after a key is pressed until it starts a search operation.
SearchFromCurrentPosition
Gets or sets a value indicating whether search will start from current position.
Declaration
public bool SearchFromCurrentPosition { get; set; }
Property Value
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.
ShowClearButton
Gets or sets a value indicating whether to show the clear button in the search row.
ShowCloseButton
Gets or sets a value indicating whether to show the close button in the search row.
Methods
CompareToSystemRowInfo(GridViewSystemRowInfo)
Compares this search row with another system row to determine the relative positioning.
Declaration
protected override int CompareToSystemRowInfo(GridViewSystemRowInfo row)
Parameters
row
The system row to compare with.
Returns
An integer indicating the relative position of this row compared to the specified row.
Overrides
CreateBackgroundWorker()
Creates and configures the background worker used for asynchronous search operations.
Declaration
protected virtual BackgroundWorker CreateBackgroundWorker()
Returns
A configured BackgroundWorker instance for search operations.
CreatePagedTraverser(bool)
Creates a paged traverser for iterating through grid rows when paging is enabled.
Declaration
protected virtual IEnumerator CreatePagedTraverser(bool grouped)
Parameters
grouped
Indicates whether the grid is grouped.
Returns
An IEnumerator for paged row traversal.
CreateTraverser()
Creates a traverser for iterating through grid rows.
Declaration
protected virtual GridTraverser CreateTraverser()
Returns
A GridTraverser configured for row traversal.
EnsurePageVisible(GridViewRowInfo)
Ensures that the page containing the specified row is visible when paging is enabled.
Declaration
protected virtual bool EnsurePageVisible(GridViewRowInfo row)
Parameters
row
The row to make visible.
Returns
True if the page was changed; otherwise, false.
EnsureViewInfoVisible(GridViewRowInfo)
Ensures that the view containing the specified row is visible in hierarchical scenarios.
Declaration
protected virtual bool EnsureViewInfoVisible(GridViewRowInfo row)
Parameters
row
The row to make visible.
Returns
True if the view was made visible; otherwise, false.
GetCellFormattedValue(GridViewRowInfo, GridViewColumn)
Gets the formatted value of a cell for search purposes.
Declaration
public virtual string GetCellFormattedValue(GridViewRowInfo row, GridViewColumn column)
Parameters
row
The row containing the cell.
column
The column containing the cell.
Returns
The formatted string value of the cell.
GetCurrentCellTraverserColumnIndex()
Gets the traverser column index of the current cell.
Declaration
protected virtual int GetCurrentCellTraverserColumnIndex()
Returns
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
protected virtual int GetCurrentCellTraverserRowIndex()
Returns
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
protected virtual bool MatchesSearchCriteria(string searchCriteria, GridViewRowInfo row, GridViewColumn col)
Parameters
searchCriteria
The search criteria to match against.
row
The row containing the cell to check.
col
The column containing the cell to check.
Returns
True if the cell matches the search criteria; otherwise, false.
OnPropertyChanged(PropertyChangedEventArgs)
Raises the PropertyChanged event and handles specific property changes.
Declaration
protected override void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters
e
The event arguments containing property change information.
Overrides
OnSearchProgressChanged(SearchProgressChangedEventArgs)
Raises the SearchProgressChanged event.
Declaration
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
protected virtual void ReportSearchProgress(int percent, GridSearchResultCellInfo resultCell, GridSearchResultCellCollection resultCells)
Parameters
percent
The completion percentage of the search operation.
resultCell
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
public void ResumeSearch()
ResumeSearch(bool)
Resumes the search functionality after it has been suspended through the SuspendSearch() method.
Declaration
public void ResumeSearch(bool performSearch)
Parameters
performSearch
Indicates whether a search should be started after search is resumed.
Search(string)
Initiates a search operation with the specified criteria.
Declaration
public virtual void Search(string criteria)
Parameters
criteria
The search criteria to use.
SelectNextSearchResult()
Selects and navigates to the next search result in the collection.
Declaration
public virtual void SelectNextSearchResult()
SelectPreviousSearchResult()
Selects and navigates to the previous search result in the collection.
Declaration
public virtual void SelectPreviousSearchResult()
SetCurrent(GridSearchResultCellInfo)
Sets the current cell to the specified search result cell and ensures it's visible.
Declaration
protected virtual void SetCurrent(GridSearchResultCellInfo cell)
Parameters
cell
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
protected virtual void SetCurrent(GridSearchResultCellInfo cell, bool checkInvokeRequired)
Parameters
cell
The search result cell to set as current.
checkInvokeRequired
Indicates whether to check if invocation is required for thread safety.
SuspendSearch()
Suspends the search functionality. While suspended no searches will be started.
Declaration
public void SuspendSearch()
TraverseRows(DoWorkEventArgs)
Traverses through all rows in the grid to find matches for the search criteria.
Declaration
protected virtual void TraverseRows(DoWorkEventArgs e = null)
Parameters
e
The DoWorkEventArgs instance containing the event data for background operations.
Events
SearchProgressChanged
Occurs when the search progress changes during a search operation.
Declaration
public event SearchProgressChangedEventHandler SearchProgressChanged
Event Value