We help IT Professionals succeed at work.

Replace Data on DBGrid

ST3VO
ST3VO asked
on
313 Views
Last Modified: 2010-04-05
Hi Experts,

I've got a DBGrid populated and I need to replace the Column name and all the Column data from it.

For example:

I'm got a column called

'Column7'
-----------
somedata1
somedata2
etc

I need to change it to this:

'ImagePath'
-------------
SomePath
SomePath
etc...

The field somePath is always going to be the same.

Hope you can help!

Thanks

ST3VO
Comment
Watch Question

Commented:
You should populate DBGrid using Query.
If You want to change only the column's title You can dblclick dbgrid and edit columns.
An appropriate dataset should be active.

Author

Commented:
I need to do all the by code and not manually.

An example code would be perfect!
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Perfect! Thanks :o)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.