Search code examples
delphidevexpresstcxgrid

How to add a hyperlink column to a TcxGrid (Developer express grid)


Hi In Delphi I've managed (!) to add a column to a TcxGrid table view that appears as a hyperlink (instead of a simple string). To do this, you simply edit 'properties' of the column and choose 'hyperlink'. The cell now shows a hyperlink style (underlined) but I canot for the life of me see how to:

  1. Get the cursor to change to the 'hand' when over the link.
  2. Add an event that is fired when I click the link.

Can anyone help? Thanks.


Solution

  • Click the column header, the column is selected.

    Goto 'Events'

    Properties - OnStartClick -> this event is fired when you click an url

    On my delphi 7 system with latest dev.express installed, the cursor is changed to a hand when an url is present.

    I zipped my Dephi 7 sample program and executable so you see the complete project your self (the download of from my own site www.edelcom.com)

    • run the exec
    • press the insert button at the bottom
    • enter url: www.google.com
    • press enter
    • move over the link - the hand appears, and clicking the link, shows a message 'clicked' , if you don't have the click event, it starts the clicked url (maybe it can do that too, but I haven't tried this)