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 & Replace in GGC

Hello, I want to design a Find & Replace functions for my GridGroupingControl form. The when user press "Ctrl+F" or "Ctrl+H", it launches a "Find & Replace" form like the .net''s one. When user click the "Find Next" button, it will locate the first cell which starts with or contains the user-typed "search content" in "current column" or "the whole grid" (search scope which can defined by user). Click "Find Next" again, it locates the second one, and so on. When click "Replace" or "Replace All", it replaces the cell''s content with user-typed "replace content". Do you have any sample with similar functions? Thanks, Lan

2 Replies

AD Administrator Syncfusion Team June 3, 2005 04:57 PM UTC

I do not have a sample for this. Are you trying support searching nested tables? If so, the task complicates quickly. For flat-ungrouped tables, I think the simplest way to handle this is through the grid.Table.FilteredRecords collection. You can look through that collection (which holds the records in the order they appear in the grid), using record.GetData to retrieve your row object (it will be a DataRowView if you are using DataTables), and then you can check this object for your match.


LM Lan Mo June 3, 2005 05:43 PM UTC

Hello Clay, I use the single table with grouping. I''ll do the function for the GGC pop-up context menu on the form. I''ve uploaded the form''s files in the previous issue titled "Programming Grouping" that you''ve solved in a few minutes ago. Thanks, Lan >I do not have a sample for this. > >Are you trying support searching nested tables? If so, the task complicates quickly. > >For flat-ungrouped tables, I think the simplest way to handle this is through the grid.Table.FilteredRecords collection. You can look through that collection (which holds the records in the order they appear in the grid), using record.GetData to retrieve your row object (it will be a DataRowView if you are using DataTables), and then you can check this object for your match.

Loader.
Live Chat Icon For mobile
Up arrow icon