search on grid

hi I want the ctrl + F functionality on the grid. The search should be on a single col. How to go about this? regards, catinat

5 Replies

AD Administrator Syncfusion Team July 18, 2005 01:29 PM UTC

The grid\samples\quickstart\gridpad sample has a Find/Replace menu item on the Edit menu that implements a Find using a GridFindReplaceDialogSink class. Here is a forum thread that discusses how to do this. It has 2 different samples in it (click the little disk icons above the post windows to get the attachments. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=4509


CV Catinat Velmourougan July 19, 2005 10:56 AM UTC

hi Does it work for grouping grid also? If not how to approach the same in grouping grid? regards, Cati


AD Administrator Syncfusion Team July 19, 2005 11:39 AM UTC

Here is a forum thread discussing seaching in a grouping grid. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=19910


CV Catinat Velmourougan July 21, 2005 06:25 AM UTC

hi I have implemented a simple find based on the filteredrecords concept. Now I have a new requirement,"when a record is found a particular column of the record should become active" I applied the following code : //recordPos is the found record''s position Record record = this.groupingGrid.SyncfusionGridControl.Table.Records[recordPos]; if (this.groupingGrid.SyncfusionGridControl.TableDescriptor.VisibleColumns.Contains("col1")) { record.SetCurrent("col1"); } But the above code just highlights the cell.The requirement is to make the cursor blink on the cell (col1 is an editable col). I also have a find modalless dialog which gets the text to be searched above the grid.


AD Administrator Syncfusion Team July 21, 2005 09:18 AM UTC

After calling GridRecord.SetCurrent, try this code: this.gridGroupingControl1.TableControl.Focus(); this.gridGroupingControl1.TableControl.CurrentCell.BeginEdit(); TextBox tb = this.gridGroupingControl1.TableControl.CurrentCell.Renderer.Control as TextBox; if(tb != null) tb.SelectAll(); The last 2 lines select all the text. If you just want the cursor at the beginning of the text, you can omit those lines.

Loader.
Up arrow icon