GridFindReplaceDialog doesnt work with GridControl

I have used the GridControl in a windows form, but im not able to find any text on the grid using the GridFindReplaceDialog. It displays "The specified text cannot be found"

Does the "find dialog" works only with the GridDataBoundGrid control ?

I have attached the test application.

Thanks in advance.

FindDialog.zip

2 Replies

AD Administrator Syncfusion Team November 1, 2006 12:36 PM UTC

Hi Mikil,

Try this code in Button.Click Event Handler.

//You should activate the grid for searching the cell text using GridFindDialog.
this.gridControl1.Focus();

//You should move the current cell to required search column location if the searchOption is Column Only.
this.gridControl1.CurrentCell.MoveTo(1,2);

fr = new GridFindReplaceDialogSink(this.gridControl1);
frDialog = GridFindReplaceDialog.Instance;
frDialog.SetState(this.fr, "", false);

frDialog.ShowDialog();

Best Regards,
Haneef


AD Administrator Syncfusion Team November 1, 2006 01:07 PM UTC

thanks Haneef... it worked !!!

>Hi Mikil,

Try this code in Button.Click Event Handler.

//You should activate the grid for searching the cell text using GridFindDialog.
this.gridControl1.Focus();

//You should move the current cell to required search column location if the searchOption is Column Only.
this.gridControl1.CurrentCell.MoveTo(1,2);

fr = new GridFindReplaceDialogSink(this.gridControl1);
frDialog = GridFindReplaceDialog.Instance;
frDialog.SetState(this.fr, "", false);

frDialog.ShowDialog();

Best Regards,
Haneef

Loader.
Up arrow icon