Пример #1
0
 private void ButtonFind_Click(object sender, EventArgs e)
 {
     if (ReportViewer1.Find(TextBoxFind.Text, ReportViewer1.CurrentPage) == 0)
     {
         MessageBox.Show("No results were found.", "CustomToolBar", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
         TextBoxFind.Text = String.Empty;
     }
 }
Пример #2
0
 private void TextBoxFind_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
 {
     if (e.KeyValue == '\r' && TextBoxFind.Text.Length > 0)
     {
         if (ReportViewer1.Find(TextBoxFind.Text, ReportViewer1.CurrentPage) == 0)
         {
             MessageBox.Show("No results were found.", "CustomToolBar", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
             TextBoxFind.Text = String.Empty;
         }
     }
 }