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 API for GridGroupingControl

Hi,
I am using GridGroupingControl V6.1(I know, I know.. We havnt upgraded in a long time). I am implementing a find feature. I was wondering if the Syncfusion API already supports a find which takes in a search string and highlight the cell contains the string or return the row,col of the next match?

the below is the piece of code we implemented.

public void Find(GridGroupingControl grid,
string searchString)
{
Regex re;
try
{
re = new Regex(searchString, RegexOptions.IgnoreCase);
}
catch (Exception)
{
throw new Exception("Please enter a valid search Keyword");
}

if(grid != null)
{
int rowCount = grid.Table.Records.Count;
int colCount = grid.TableDescriptor.GetColCount();

//Row 1 is the header row
for(int i = 2; i <= rowCount + 1; i++)
{
for (int j = 1; j <= colCount; j++)
{
GridTableCellStyleInfo si = grid.TableModel[i, j];
string strData = si.Text;

if (re.IsMatch(strData) || (strData == searchString))
{
grid.TableModel.Selections.Clear();
grid.TableControl.Selections.SelectRange(GridRangeInfo.Row(i), true);
grid.TableControl.ScrollCellInView(i, j);
//_startRow = i + 1;
return;
}
}
}

}
}



3 Replies

NR Nirmal Raja Syncfusion Team December 7, 2010 12:44 PM UTC

Hi Navaneeth,

Thank you for your interest in Syncfusion products.

The Find and Replace of the grid cell content has internal support through API available in the GridControlBase.

Please refer the sample from our sample browser, which will be available in the machine that has Essential Studio installed, located in the following location:
{Installed Drive}:\Syncfusion\EssentialStudio\{Version Number}\Windows\Grid.Grouping.Windows\Samples\2.0\Product Showcase\Find-Replace Demo\cs

Let me know if you have any concern.

Regards,
Nirmal



EN Endri February 17, 2011 01:53 AM UTC

why mask the edit on the grid grouping control can not be converted to datetime. please help me.







CI Christopher Issac Sunder K Syncfusion Team February 17, 2011 11:21 AM UTC

Hi Endri,

Thanks for the update.

We have found that one of your incident #77175 which is having the same query. So, Please follow the incident #77175 for futher details.

Please let me know if you have any other clarifications.

Regards,
Christo.


Loader.
Live Chat Icon For mobile
Up arrow icon