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?
Thanks (both) for the examples. I'm going to try.
Error: The type or namespace name 'UltraGridColumn' could not be found (are you missing a using directive or an assembly reference?)
Wich one ?
Namespace error fixed. Stupid mistake.
How to use the arguments. (RowsCollection rows and UltraGridColumn column)
private UltraGridRow SearchCells(string text, RowsCollection rows, UltraGridColumn column, StringComparison compareMethod)
How to use the arguments. RowsCollection rows AND UltraGridColumn column