{"action":"created","issue":{"url":"https://api.github.com/repos/tabalinas/jsgrid/issues/99","labels_url":"https://api.github.com/repos/tabalinas/jsgrid/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/tabalinas/jsgrid/issues/99/comments","events_url":"https://api.github.com/repos/tabalinas/jsgrid/issues/99/events","html_url":"https://github.com/tabalinas/jsgrid/issues/99","id":104666868,"number":99,"title":"Altering and hiding fields without updating the complete fields configuration","user":{"login":"floriandammeyer","id":3848029,"avatar_url":"https://avatars.githubusercontent.com/u/3848029?v=3","gravatar_id":"","url":"https://api.github.com/users/floriandammeyer","html_url":"https://github.com/floriandammeyer","followers_url":"https://api.github.com/users/floriandammeyer/followers","following_url":"https://api.github.com/users/floriandammeyer/following{/other_user}","gists_url":"https://api.github.com/users/floriandammeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/floriandammeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floriandammeyer/subscriptions","organizations_url":"https://api.github.com/users/floriandammeyer/orgs","repos_url":"https://api.github.com/users/floriandammeyer/repos","events_url":"https://api.github.com/users/floriandammeyer/events{/privacy}","received_events_url":"https://api.github.com/users/floriandammeyer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tabalinas/jsgrid/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-03T10:49:35Z","updated_at":"2015-11-27T11:08:05Z","closed_at":"2015-10-26T00:40:29Z","body":"I am transitioning from Datatables (http://datatables.net) to js-grid because Datatables is bloated and dusty and js-grid made a very good first impression on me.\r\n\r\nHowever, I am missing convenient ways of altering or hiding fields that I temporarily don't want to show. Updating the complete 'fields' option via `$('#my_grid').jsGrid('option', 'fields', []);` seems too cumbersome, because in addition to the changed field, I also always need to include the static fields that I never intend to change in the configuration array.\r\n\r\nA utility method like `jsGrid.alterField(column_name, new_settings)` or `jsGrid.alterField(column_name, key, value)` would be really helpful for reducing overhead.\r\n\r\nHiding a column via CSS is not ideal either, because that messes up the widths of the other columns that have been calculated by js-grid. Datatables has a \"visible\" property for each field. This way, you can preconfigure all columns, even the ones that you don't want to show immediately. When the time has come, you can simply change the \"visible\" property to true and the preconfigured column will show up. In combination with the abovementioned `alterField()` method you could easily show and hide columns with the benefit of js-grid recalculating the widths of the other columns, so that everything looks nice all the time.\r\n\r\nA call to `$('#my_grid').jsGrid('alterField', 'my_hidden_column', 'visible', true);` would make my hidden column show up and re-render the table, so that all widths are recalculated nicely.\r\n"},"comment":{"url":"https://api.github.com/repos/tabalinas/jsgrid/issues/comments/160115749","html_url":"https://github.com/tabalinas/jsgrid/issues/99#issuecomment-160115749","issue_url":"https://api.github.com/repos/tabalinas/jsgrid/issues/99","id":160115749,"user":{"login":"Plush-Animal","id":16045754,"avatar_url":"https://avatars.githubusercontent.com/u/16045754?v=3","gravatar_id":"","url":"https://api.github.com/users/Plush-Animal","html_url":"https://github.com/Plush-Animal","followers_url":"https://api.github.com/users/Plush-Animal/followers","following_url":"https://api.github.com/users/Plush-Animal/following{/other_user}","gists_url":"https://api.github.com/users/Plush-Animal/gists{/gist_id}","starred_url":"https://api.github.com/users/Plush-Animal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plush-Animal/subscriptions","organizations_url":"https://api.github.com/users/Plush-Animal/orgs","repos_url":"https://api.github.com/users/Plush-Animal/repos","events_url":"https://api.github.com/users/Plush-Animal/events{/privacy}","received_events_url":"https://api.github.com/users/Plush-Animal/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T11:08:05Z","updated_at":"2015-11-27T11:08:05Z","body":"Hello,\r\n\r\nPlease,... сan you say, how we can use this method?\r\nBecause I don't understand, where need write and that.\r\nFor example, how i write now:\r\n\r\n$(\"#jsGrid\") .jsGrid({\r\ninserting : false,\r\nfiltering: true,\r\nediting: true,\r\nvisible:true,\r\nfields:  [\r\n...\r\n{ name: \"EmailContent\", visible: false, type: \"text\", width: 50,height: \"auto\", title:'Email'},\r\n...\r\n],\r\n});\r\n\r\nBut it dosn't work!\r\n\r\nHelp"}}