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.
Unfortunately, activation email could not send to your email. Please try again.

GridFindAndReplaceDialog

Thread ID:

Created:

Updated:

Platform:

Replies:

26067 Mar 11,2005 05:33 PM Mar 17,2005 10:35 AM Windows Forms 2
loading
Tags: GridControl
peterz
Asked On March 11, 2005 05:33 PM

I have searched the help files and have not been able to find a property/method/constructor to set or change the default value in the Selection comboBox when the dialog is shown. I am using versoin 2.1.0.9 of the grid. I want to use the combobox but it defaults to "Column Only" and I want it to default to "Whole Table". I am finding that users think the Find functionality is broken because they expect the find to work across the whole grid by default. From another post, I have used a hack to achieve what I want, but I was hoping there was a more appropriate, and future fullproof method of doing it. Here is the hack used just before showing the dialog: GridFindReplaceDialog dlg = GridFindReplaceDialog.Instance; foreach(Control c in dlg.Controls) { if(c is ComboBox && c.Name == "comboBoxSelection") { ((ComboBox)c).SelectedIndex = 0; } } Thank you for your time.

Administrator [Syncfusion]
Replied On March 12, 2005 11:44 AM

Hi Peter, the find replace dialog can be replaced with your own custom dialog. The key is that you provide an object that implements IGridFindReplaceDialogSink. You can for example take the source code found in grid source for GridFindReplaceDialog, copy/paste it into your application, rename it and use this dialog instead. In the attached example (modified from GridPad), this approach was taken. Now you can go in there and modify CustomFindReplaceDialog in the designer or just change default settings etc. You have full control over the appearance and behavior of the find replace dialog. The uploaded sample compiles with 2.1.0.9. For 3.x you will need to change references to 3.x assemblies. Then it should compile with 3.x GridPadWithCustomFindReplace.zip Stefan >I have searched the help files and have not been able to find a property/method/constructor to set or change the default value in the Selection comboBox when the dialog is shown. I am using versoin 2.1.0.9 of the grid. I want to use the combobox but it defaults to "Column Only" and I want it to default to "Whole Table". I am finding that users think the Find functionality is broken because they expect the find to work across the whole grid by default. From another post, I have used a hack to achieve what I want, but I was hoping there was a more appropriate, and future fullproof method of doing it. Here is the hack used just before showing the dialog: > >GridFindReplaceDialog dlg = GridFindReplaceDialog.Instance; >foreach(Control c in dlg.Controls) >{ > if(c is ComboBox && c.Name == "comboBoxSelection") > { > ((ComboBox)c).SelectedIndex = 0; > } > >} > >Thank you for your time.

Administrator [Syncfusion]
Replied On March 17, 2005 10:35 AM

Stefan, Thank you once again for your excellent support. Pete.

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.

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.

;