I'm a bit rusty on my devexpress but in your gridcontrol i think you should be specifying a grid view. From that grid view, in order to get the Id from an Id column you would do.
devExpressGridView.GetFocusedRowCellValue("Id")
This would assume that your grid's columns contain a column with label of Id. So if your column is labeled Index, then you would switch out Id with Index.