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

Search in GridGroupingControl

Is there any search capability built in the gridgroupingcontrol? If I have to do it myself, any suggestion for me to start with. The difference between filtering and searching: filtering - you see only the records satisfying the condition. Searching - you locate and highlighting the satisfying record. No filter applied or filter setting is a precondtion. Thanks, albert

4 Replies

AD Administrator Syncfusion Team October 6, 2004 11:32 AM UTC

Here is a forum thread that discusses how you can currently search a grouping grid. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17240


AG Albert Gao October 6, 2004 12:03 PM UTC

Thanks for the pointer. I checked "FindRecord" method. It returns the index of the first record. If I want to highlight all records matching the criteria, I may have to loop through the whole table. Am I right? Thanks, Albert >Here is a forum thread that discusses how you can currently search a grouping grid. > >http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17240


AD Administrator Syncfusion Team October 6, 2004 12:10 PM UTC

Hi Albert, if you want to conditionally highlight records, check out also the ConditionalFormats collection. For example: gridConditionalFormatDescriptor1.Appearance.AnyHeaderCell.Interior = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(255)), ((System.Byte)(192)))); gridConditionalFormatDescriptor1.Expression = "[CategoryID]=5"; gridConditionalFormatDescriptor1.Name = "Criteria 2"; gridConditionalFormatDescriptor2.Appearance.AnyRecordFieldCell.BaseStyle = "Beige"; gridConditionalFormatDescriptor2.Name = "Criteria 1"; gridConditionalFormatDescriptor2.RecordFilters.Add(new Syncfusion.Grouping.RecordFilterDescriptor("CategoryID", Syncfusion.Grouping.FilterLogicalOperator.Or, new Syncfusion.Grouping.FilterCondition[] { new Syncfusion.Grouping.FilterCondition(Syncfusion.Grouping.FilterCompareOperator.Equals, "2")})); this.gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(gridConditionalFormatDescriptor1); this.gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(gridConditionalFormatDescriptor2); Stefan


AG Albert Gao October 6, 2004 12:55 PM UTC

Stefan, Thank you for pointing conditional formating. I believe the solution I am looking for is the combination of FindRecord and conditional formating. I will use conditional formating to highlight the records matching the critiria, and use FindRecord to change the first record is selected. Thanks again, Albert

Loader.
Up arrow icon