To add a functional link (i.e. Edit/Delete etc),:
- Add any columns to the grid.
- Change the type to Hyperlink.
- May toggle ‘Read-Only’ (since you don’t really want to change the value), but do NOT check ‘Disable Editor’ (otherwise the link event won’t be fired).
- Put the name of the link in Format String. Make sure Format is not ftNone otherwise the FormatString will be ignored)
- Check “Single Click to Launch”
- Uncheck “Row Select” property for the grid, otherwise no OnEdit or OnHyperlinkStart event will fire. (Note: “Row Select” will automatically disable in-place editing. So if you don’t want in-place editing you need to toggle “ReadOnly”. With “ReadOnly”, the editor will still be invoked but values are not changable. )
- Handle OnHyperlinkStart Event
What happens is that when user clicks on that blue link, the text in that cell will turn to the original value of the bound field. As soon as the OnHyperlinkStart event returns, it will switch back to the format string you specify in Columns properties.