I have found a kind of an answer here :
https://www.devexpress.com/Support/Center/Question/Details/A2079
https://www.devexpress.com/Support/Center/Question/Details/T357085
But I need the code in Delphi. I understand I need to have an unbound column but dont know the right code. So any help would be nice.
I found the answer here on devexpress support center:
It explains how to add row numbers in an unbound grid column.