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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

WholeTable Search

Thread ID:

Created:

Updated:

Platform:

Replies:

62155 Jun 8,2007 02:25 PM UTC Jun 8,2007 03:38 PM UTC WinForms 2
loading
Tags: GridControl
Qingde Shi
Asked On June 8, 2007 02:25 PM UTC

Hi,

I am trying to search grid using GridFindReplaceDialogSink
ColumnOnly option works,
However, the WholeTable option does not work.
Here is my code:

public void FindCellText(string text)
{
GridFindReplaceDialogSink frDialog = new GridFindReplaceDialogSink(this);
GridFindTextOptions option = GridFindTextOptions.None;
option |= GridFindTextOptions.WholeTable;
GridFindReplaceEventArgs frEventArgs = new GridFindReplaceEventArgs(text, "", option, null);
frDialog.Find(frEventArgs);
}


Thanks.

Q

Qingde Shi
Replied On June 8, 2007 02:47 PM UTC

Not sure if I found the answer, but set the grid to focus made it works.

>Hi,

I am trying to search grid using GridFindReplaceDialogSink
ColumnOnly option works,
However, the WholeTable option does not work.
Here is my code:

public void FindCellText(string text)
{
GridFindReplaceDialogSink frDialog = new GridFindReplaceDialogSink(this);
GridFindTextOptions option = GridFindTextOptions.None;
option |= GridFindTextOptions.WholeTable;
GridFindReplaceEventArgs frEventArgs = new GridFindReplaceEventArgs(text, "", option, null);
frDialog.Find(frEventArgs);
}


Thanks.

Q

Rajagopal [Syncfusion]
Replied On June 8, 2007 03:38 PM UTC

Hi,

Here is your modified code below that should work fine.

public void FindCellText(string text)
{
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
if (cc.RowIndex == -1 || cc.ColIndex == -1)
this.gridGroupingControl1.TableControl.CurrentCell.Activate(1, 1);
else
this.gridGroupingControl1.TableControl.CurrentCell.Activate(cc.RowIndex, cc.ColIndex);

GridFindReplaceDialogSink frDialog = new GridFindReplaceDialogSink(this.gridGroupingControl1.TableControl);
GridFindTextOptions option = GridFindTextOptions.None;
option |= GridFindTextOptions.WholeTable;
GridFindReplaceEventArgs frEventArgs = new GridFindReplaceEventArgs(text, "", option, null);
frDialog.Find(frEventArgs);

if (!this.gridGroupingControl1.TableControl.HasControlFocus)
this.gridGroupingControl1.TableControl.Focus();
}

Thanks for using Syncfusion Products.
Regards,
Rajagopal

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;