Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Using Search and Replace in DBGrid

Drewski65Drewski65 Posts: 1Member
I am working on an application that performs a Query on a Table full of values extracted from a set of documentation. Each Record in the Table has a Field Named "TEXT". Table is a Paradox Table and I am using BCB 6.0.

I perform the Query and display the results in the DBGrid.

Now I want to be able to prompt for a Search Text and replace every value in the Query in the "TEXT" Field. I also want to be able to have the user be able to confirm the replacement of each match that it finds.

The matching and replacement works ok if I use a seperate TEdit Box and put the contents of the "TEXT" Field in it and use the TEditBox Select Text methods to hi-light the text the program will replace while confirming from the user.

Ok, so what I want to do is to be able to do this in the DBGrid as apposed to doing this in a seperate TEdit Box. Is there a way of setting the Text in the DBGrid for the active Record and show the Selected Text (Which maybe a sub string of the Text in the Field) as Selected?

Sign In or Register to comment.