GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class > Search Method : Search(String,SearchFlags,Int32,Int32) Method |
'Declaration Public Overloads Sub Search( _ ByVal searchString As String, _ ByVal searchFlags As SearchFlags, _ ByRef foundRowIndex As Integer, _ ByRef foundColumnIndex As Integer _ )
'Usage Dim instance As Worksheet Dim searchString As String Dim searchFlags As SearchFlags Dim foundRowIndex As Integer Dim foundColumnIndex As Integer instance.Search(searchString, searchFlags, foundRowIndex, foundColumnIndex)
public void Search( string searchString, SearchFlags searchFlags, out int foundRowIndex, out int foundColumnIndex )
gcSpreadSheet1.Sheets[0].Cells[5, 4].Text = "test"; 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.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, out rowfound, out colfound); //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, out rowfound, out colfound); //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, out rowfound, out colfound); //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, out rowfound, out colfound); //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 0, 0, out rowfound, out colfound); //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, out rowfound, out colfound); //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, out rowfound, out colfound); //gcSpreadSheet1.Sheets[0].Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, out rowfound, out colfound, out foundstring); listBox1.Items.Add(colfound.ToString()); gcSpreadSheet1.Invalidate(); }
GcSpreadSheet1.Sheets(0).Cells(5, 4).Text = "test" Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs) 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.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, rowfound, colfound) 'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, rowfound, colfound) 'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, rowfound, colfound) 'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, rowfound, colfound) 'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 0, 0, rowfound, colfound) 'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, rowfound, colfound) 'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, rowfound, colfound) 'GcSpreadSheet1.Sheets(0).Search("test", GrapeCity.Xaml.SpreadSheet.Data.SearchFlags.ExactMatch, GrapeCity.Xaml.SpreadSheet.Data.SearchOrder.ZOrder, GrapeCity.Xaml.SpreadSheet.Data.SearchFoundFlags.CellText, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 0, 0, 7, 7, rowfound, colfound, foundstring) ListBox1.Items.Add(colfound.ToString()) End Sub
Target Platforms: Windows Server 2012, Windows RT