{"action":"created","issue":{"url":"https://api.github.com/repos/Chumper/Datatable/issues/291","labels_url":"https://api.github.com/repos/Chumper/Datatable/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/Chumper/Datatable/issues/291/comments","events_url":"https://api.github.com/repos/Chumper/Datatable/issues/291/events","html_url":"https://github.com/Chumper/Datatable/issues/291","id":68469341,"number":291,"title":"Row Id in datatable","user":{"login":"stumped101","id":10439328,"avatar_url":"https://avatars.githubusercontent.com/u/10439328?v=3","gravatar_id":"","url":"https://api.github.com/users/stumped101","html_url":"https://github.com/stumped101","followers_url":"https://api.github.com/users/stumped101/followers","following_url":"https://api.github.com/users/stumped101/following{/other_user}","gists_url":"https://api.github.com/users/stumped101/gists{/gist_id}","starred_url":"https://api.github.com/users/stumped101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stumped101/subscriptions","organizations_url":"https://api.github.com/users/stumped101/orgs","repos_url":"https://api.github.com/users/stumped101/repos","events_url":"https://api.github.com/users/stumped101/events{/privacy}","received_events_url":"https://api.github.com/users/stumped101/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-14T18:59:29Z","updated_at":"2015-04-21T03:38:35Z","closed_at":null,"body":"Anyone know how to get a row number and display it in the first column (This is not the same as the $model->id)\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/Chumper/Datatable/issues/comments/94628922","html_url":"https://github.com/Chumper/Datatable/issues/291#issuecomment-94628922","issue_url":"https://api.github.com/repos/Chumper/Datatable/issues/291","id":94628922,"user":{"login":"minhbang","id":1449094,"avatar_url":"https://avatars.githubusercontent.com/u/1449094?v=3","gravatar_id":"","url":"https://api.github.com/users/minhbang","html_url":"https://github.com/minhbang","followers_url":"https://api.github.com/users/minhbang/followers","following_url":"https://api.github.com/users/minhbang/following{/other_user}","gists_url":"https://api.github.com/users/minhbang/gists{/gist_id}","starred_url":"https://api.github.com/users/minhbang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minhbang/subscriptions","organizations_url":"https://api.github.com/users/minhbang/orgs","repos_url":"https://api.github.com/users/minhbang/repos","events_url":"https://api.github.com/users/minhbang/events{/privacy}","received_events_url":"https://api.github.com/users/minhbang/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T03:38:35Z","updated_at":"2015-04-21T03:38:35Z","body":"You can use **fnRowCallback** callback:\r\n```php\r\n    ->setCallbacks(\r\n        'fnRowCallback', 'function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {\r\n            var numStart = this.fnPagingInfo().iStart,\r\n                  index = numStart + iDisplayIndexFull + 1;\r\n            $.find(\"td:first\", nRow).html(index);\r\n            return nRow;\r\n        }'\r\n    )\r\n```\r\nand do not forget the first empty column:  **->addColumn('',...)**"}}