I'am looking for a WinGrid text search example (C#).
I want to add a text search facility to my app.The WinGrid control contains hierarchical data from a XML-file.
Example:
private UltraGridRow SearchCells( string text, RowsCollection rows, UltraGridColumn column, StringComparison compareMethod ){ foreach( UltraGridRow row in rows ) { string cellText = row.GetCellText(column); if ( string.Equals(cellText, text, compareMethod) ) return row; }
return null;}
UltraGridRow exposes methods (see HasChild, GetChild) which give you a way to get the child rows, so you could expand this method to call itself recursively when the row has children.
HOWTO:How can I make UltraWinGrid allow keyboard searching?