We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Find & Replace Dialog

Clay, I saw the sample for Find & Replace Dialog. I would like to implmenet same way the Find & Replace Dialog works microsoft word. Example. Col1 Col2 12 1 23 4 44 5 5 6 7 23 In the above example, if I search and replace 23 I should able to replace after twice i pressed the ''Replace'' button. Once it replaced, I want to display still the dialog box, which should not close. ----------------------------------- Sample code private void button7_Click(object sender, System.EventArgs e) { // to show the dialog: GridFindReplaceDialog frDialog = GridFindReplaceDialog.Instance; frDialog.SetState(GridFindReplaceDialogSink, "", false); frDialog.Options = GridFindReplaceDialogOptions.All; frDialog.Text = "Great Boss"; //GridFindReplaceDialogOptions options = GridFindReplaceDialogOptions.All; frDialog.Show(); } GridFindReplaceDialogSink findReplaceDialogSink; public GridFindReplaceDialogSink GridFindReplaceDialogSink { get { if (findReplaceDialogSink == null) { findReplaceDialogSink = new GridFindReplaceDialogSink(gridDataBoundGrid1); } return findReplaceDialogSink; } } ------------------ Thanks Satish

1 Reply

AD Administrator Syncfusion Team April 27, 2004 01:26 PM

Satish, do you have source code for the grid? If yes, check out the implementation of GridFindReplaceDialogSink. You can copy/paste the code for GridFindReplaceDialogSink and GridFindReplaceDialog into different classes in your project and modify the code so that it fits your needs. I don''t think you will be able to customize the find/replace behavior to your needs by just handling events. But, the grid lets you use any class that implements IGridFindReplaceDialogSink. GridFindReplaceDialogSink is the default implementation of IGridFindReplaceDialogSink. If you copy these classes to your project you can use them instead of the default GridFindReplaceDialogSink the grid provides. Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon