{"action":"opened","issue":{"url":"https://api.github.com/repos/ceolter/ag-grid/issues/630","labels_url":"https://api.github.com/repos/ceolter/ag-grid/issues/630/labels{/name}","comments_url":"https://api.github.com/repos/ceolter/ag-grid/issues/630/comments","events_url":"https://api.github.com/repos/ceolter/ag-grid/issues/630/events","html_url":"https://github.com/ceolter/ag-grid/issues/630","id":125926981,"number":630,"title":"Add drag and drop reorder of columns (directly rather than via the tool panel)","user":{"login":"vladimir-ivanov","id":979785,"avatar_url":"https://avatars.githubusercontent.com/u/979785?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimir-ivanov","html_url":"https://github.com/vladimir-ivanov","followers_url":"https://api.github.com/users/vladimir-ivanov/followers","following_url":"https://api.github.com/users/vladimir-ivanov/following{/other_user}","gists_url":"https://api.github.com/users/vladimir-ivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimir-ivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimir-ivanov/subscriptions","organizations_url":"https://api.github.com/users/vladimir-ivanov/orgs","repos_url":"https://api.github.com/users/vladimir-ivanov/repos","events_url":"https://api.github.com/users/vladimir-ivanov/events{/privacy}","received_events_url":"https://api.github.com/users/vladimir-ivanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-11T11:51:20Z","updated_at":"2016-01-11T11:51:20Z","closed_at":null,"body":"As mentioned (incorrectly) in https://github.com/ceolter/ag-grid/issues/593\r\n\r\nCan create a pull request if the feature is acceptable?\r\n\r\nthe difference is in https://github.com/ceolter/ag-grid/blob/0fa265e8f876c4a99683d14839f3c3ab40f90ff5/src/ts/headerRendering/renderedHeaderCell.ts <https://github.com/ceolter/ag-grid/blob/0fa265e8f876c4a99683d14839f3c3ab40f90ff5/src/ts/headerRendering/renderedHeaderCell.ts>\r\n\r\ninside private setupComponents() method, added this code  e.g. line 160 (after this.addMenu() -> self = this))\r\n\r\n\r\n            if (self.gridOptionsWrapper.gridOptions.enableColReorder) { //TODO - find the best place for this\r\n                headerCellLabel.setAttribute('draggable', 'true');\r\n                headerCellLabel.addEventListener('dragstart', ev => sourceColumn = self.column);\r\n\r\n                headerCellLabel.addEventListener('drop', ev => {\r\n                    ev.preventDefault();\r\n\r\n                    self.gridOptionsWrapper.gridOptions.columnApi.moveColumn(sourceColumn.index, self.column.index);\r\n                });\r\n\r\n                headerCellLabel.addEventListener('dragover', ev => ev.preventDefault());\r\n            }\r\n\r\n"}}