Spread WPF Documentation
SearchOrder Enumeration
Example Example 


GrapeCity.Windows.SpreadSheet.Data Namespace : SearchOrder Enumeration
Specifies the type of search direction.
Syntax
'Declaration
 
Public Enum SearchOrder 
   Inherits System.Enum
'Usage
 
Dim instance As SearchOrder
public enum SearchOrder : System.Enum 
Members
MemberDescription
NOrderDetermines whether the search goes by row, column coordinates.
ZOrderDetermines whether the search goes by column, row coordinates.
Example
This example uses the SearchOrder enumeration.
private void Window_Loaded(object sender, RoutedEventArgs e)
        {
gcSpreadSheet1.Sheets[0].Cells[5, 4].Text = "test";
gcSpreadSheet1.Invalidate();                
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            int colfound;
            int rowfound;
            string foundstring;
            colfound = 0;
            rowfound = 0;            
            gcSpreadSheet1.Sheets[0].Search("test", out rowfound, out colfound);
            //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, out rowfound, out colfound);
            //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, out rowfound, out colfound);
            //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, out rowfound, out colfound);
            //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, out rowfound, out colfound);
            //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, 0, 0, out rowfound, out colfound);
            //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, out rowfound, out colfound);
            //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, out rowfound, out colfound);
            //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, out rowfound, out colfound, out foundstring);
            listBox1.Items.Add(colfound.ToString());            
            gcSpreadSheet1.Invalidate();
        }
Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
GcSpreadSheet1.Sheets(0).Cells(5, 4).Text = "test"
GcSpreadSheet1.Invalidate()
End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
Dim colfound As Integer
Dim rowfound As Integer
Dim sheetfound As Integer
Dim foundstring As String
colfound = 0
rowfound = 0
sheetfound = 0
foundstring = ""
GcSpreadSheet1.SheetCount = 2
GcSpreadSheet1.Sheets(0).Search("test", rowfound, colfound)
'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, rowfound, colfound)
'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, rowfound, colfound)
'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, rowfound, colfound)
'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, rowfound, colfound)
'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, 0, 0, rowfound, colfound)
'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, rowfound, colfound)
'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, rowfound, colfound)
'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, rowfound, colfound, foundstring)
ListBox1.Items.Add(colfound.ToString())
GcSpreadSheet1.Invalidate()
    End Sub
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Windows.SpreadSheet.Data.SearchOrder

See Also

Reference

GrapeCity.Windows.SpreadSheet.Data Namespace