GrapeCity.Windows.SpreadSheet.UI Namespace > GcSpreadSheet Class > Search Method : Search(Int32,String,SearchFlags,SearchOrder,SearchFoundFlags,SheetArea,Int32,Int32,Int32,Int32) Method |
'Declaration Public Overloads Function Search( _ ByVal sheetIndex As System.Integer, _ ByVal searchString As System.String, _ ByVal searchFlags As SearchFlags, _ ByVal searchOrder As SearchOrder, _ ByVal searchTarget As SearchFoundFlags, _ ByVal sheetArea As SheetArea, _ ByVal rowStart As System.Integer, _ ByVal columnStart As System.Integer, _ ByRef foundRowIndex As System.Integer, _ ByRef foundColumnIndex As System.Integer _ ) As SearchFoundFlags
'Usage Dim instance As GcSpreadSheet Dim sheetIndex As System.Integer Dim searchString As System.String Dim searchFlags As SearchFlags Dim searchOrder As SearchOrder Dim searchTarget As SearchFoundFlags Dim sheetArea As SheetArea Dim rowStart As System.Integer Dim columnStart As System.Integer Dim foundRowIndex As System.Integer Dim foundColumnIndex As System.Integer Dim value As SearchFoundFlags value = instance.Search(sheetIndex, searchString, searchFlags, searchOrder, searchTarget, sheetArea, rowStart, columnStart, foundRowIndex, foundColumnIndex)
public SearchFoundFlags Search( System.int sheetIndex, System.string searchString, SearchFlags searchFlags, SearchOrder searchOrder, SearchFoundFlags searchTarget, SheetArea sheetArea, System.int rowStart, System.int columnStart, out System.int foundRowIndex, out System.int foundColumnIndex )
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; int sheetfound; string foundstring; colfound = 0; rowfound = 0; sheetfound = 0; gcSpreadSheet1.SheetCount = 2; //gcSpreadSheet1.Search(0, "test", out rowfound, out colfound); //gcSpreadSheet1.Search(0, "test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, out rowfound, out colfound); //gcSpreadSheet1.Search(0, "test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, out rowfound, out colfound); //gcSpreadSheet1.Search(0, "test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, out rowfound, out colfound); //gcSpreadSheet1.Search(0, "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.Search(0, "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.Search(0, "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.Search(0, 1, "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 sheetfound, out rowfound, out colfound); gcSpreadSheet1.Search(0, 0, "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 sheetfound, 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.Search(0, "test", rowfound, colfound) 'GcSpreadSheet1.Search(0, "test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, rowfound, colfound) 'GcSpreadSheet1.Search(0, "test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, rowfound, colfound) 'GcSpreadSheet1.Search(0, "test", GrapeCity.Windows.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Windows.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Windows.SpreadSheet.Data.SearchFoundFlags.CellText, rowfound, colfound) 'GcSpreadSheet1.Search(0, "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.Search(0, "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.Search(0, "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.Search(0, 1, "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, sheetfound, rowfound, colfound) GcSpreadSheet1.Search(0, 0, "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, sheetfound, rowfound, colfound, foundstring) ListBox1.Items.Add(colfound.ToString()) GcSpreadSheet1.Invalidate() End Sub
Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6