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

Find Cells and Highlight the Find Results

Thread ID:

Created:

Updated:

Platform:

Replies:

109410 Jun 11,2013 07:23 PM UTC Jun 19,2013 03:46 AM UTC WinForms 3
loading
Tags: GridControl
Bryan Roberts
Asked On June 11, 2013 07:23 PM UTC

Good Afternoon,

I am looking for a way to expand on my Find feature that I am using. Right now I am searching a data sequence for example "1001" across multiple rows in a grid. When I find the "4" cells that contain this data I would like to either change the background color or more preferably apply a border to show these are the cells that the search found. Is there a way to do this in Syncfusion?

Thank you,
Bryan

Arun Kumar V [Syncfusion]
Replied On June 14, 2013 04:22 AM UTC

Hi Bryan,

Thanks for your interest in Syncfusion products.

From the reported query it seems that the intention is to highlight records based on filter criteria.

To Highlight Records:

To highlight records you can make use of the PrepareViewStyleInfo event / QueryCellStyleInfo event.

Sample:

I have attached  a sample of how to highlight the current record(Using PrepareViewStyleInfo event). Please use the selection mode tab in the application and choose the available radiobutton mode as such as how you want to highlight the selected grid cells record. 

Link: http://www.syncfusion.com/downloads/Support/DirectTrac/109372/cs.zip

 

//PepareViewStyleInfo event…..

Tweak the customizsation code to get the selected rows..

// Highlight the current row with SystemColors.Highlight and bold font

if (e.RowIndex > grid.Model.Rows.HeaderCount && e.ColIndex > grid.Model.Cols.HeaderCount

&& cc.HasCurrentCellAt(e.RowIndex))

{

e.Style.Interior = new BrushInfo(SystemColors.Highlight);

e.Style.TextColor = SystemColors.HighlightText;

e.Style.Font.Bold = true;

}

Please let me know if you have any concerns.

Regards,

Arun.


Bryan Roberts
Replied On June 17, 2013 03:18 PM UTC

Arun,

Thank you for your help. That is exactly what I was looking for.

-Bryan

Arun Kumar V [Syncfusion]
Replied On June 19, 2013 03:46 AM UTC

Hi Bryan,

We are glad to hear the issue is resolved in your end. Please create a new incident or new forum thread for any of your newer queries.

Regards,

Arun.


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

;