{"action":"created","issue":{"url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/254","repository_url":"https://api.github.com/repos/free-jqgrid/jqGrid","labels_url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/254/comments","events_url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/254/events","html_url":"https://github.com/free-jqgrid/jqGrid/issues/254","id":167538012,"number":254,"title":"jQuery MultiSelect UI Widget does not retain selection when jgrid is reloaded","user":{"login":"AshK14","id":20477965,"avatar_url":"https://avatars.githubusercontent.com/u/20477965?v=3","gravatar_id":"","url":"https://api.github.com/users/AshK14","html_url":"https://github.com/AshK14","followers_url":"https://api.github.com/users/AshK14/followers","following_url":"https://api.github.com/users/AshK14/following{/other_user}","gists_url":"https://api.github.com/users/AshK14/gists{/gist_id}","starred_url":"https://api.github.com/users/AshK14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AshK14/subscriptions","organizations_url":"https://api.github.com/users/AshK14/orgs","repos_url":"https://api.github.com/users/AshK14/repos","events_url":"https://api.github.com/users/AshK14/events{/privacy}","received_events_url":"https://api.github.com/users/AshK14/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/free-jqgrid/jqGrid/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-26T07:24:01Z","updated_at":"2016-07-27T15:30:58Z","closed_at":null,"body":"Hi Oleg,\r\n\r\nI am not able to get around this issue.\r\nI am loading data through json and with loadonce:true. We can filter data using multiselect widget, and then update any row. When the row is updated, I am destroying the filtertoolbar and then creating it again after reload from server.\r\nI also have to make sure that the previously selected values are retained after reload.\r\n\r\nEverything works, filtertoolbar has the selection retained and also the data is filtered using previous selection on reload from server, but the multiselect widget does not have the previous options selected. All the selections in the multiselect dropdowns are cleared(unselected).\r\n\r\nSelection is retained in multiselect dropdown if we filter by one value and then update the row, however if we are filtering by multiple values in multiselect dropdown and then updating the row, all the values of multiselect dropdown are unselected after the grid reloads.\r\n\r\nHowever postdata.filters has all the previous selections intact, it is getting applied to filtertoolbar on reload, just that multiselect widget is not showing the previous selections.\r\n\r\nIf I do not do 'destroyFilterToolbar', the selections are retained in the multiselect widget, but then new values of the column if any after the update, are not reflected in the multiselect dropdown.\r\n\r\nI prepared a small fiddle using local data,\r\nhttps://jsfiddle.net/AshK14/5gnvxvke/1/\r\n\r\nAlso tried to simulate it using json, but it does not exactly reflect the issue due to data(the approach is similar to what I am using),\r\nhttp://jsfiddle.net/AshK14/3mff9pg9/5/\r\n\r\nHope you understood the issue that I am facing.\r\nLet me know your thoughts.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/comments/235623363","html_url":"https://github.com/free-jqgrid/jqGrid/issues/254#issuecomment-235623363","issue_url":"https://api.github.com/repos/free-jqgrid/jqGrid/issues/254","id":235623363,"user":{"login":"AshK14","id":20477965,"avatar_url":"https://avatars.githubusercontent.com/u/20477965?v=3","gravatar_id":"","url":"https://api.github.com/users/AshK14","html_url":"https://github.com/AshK14","followers_url":"https://api.github.com/users/AshK14/followers","following_url":"https://api.github.com/users/AshK14/following{/other_user}","gists_url":"https://api.github.com/users/AshK14/gists{/gist_id}","starred_url":"https://api.github.com/users/AshK14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AshK14/subscriptions","organizations_url":"https://api.github.com/users/AshK14/orgs","repos_url":"https://api.github.com/users/AshK14/repos","events_url":"https://api.github.com/users/AshK14/events{/privacy}","received_events_url":"https://api.github.com/users/AshK14/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T15:30:58Z","updated_at":"2016-07-27T15:30:58Z","body":"Hi Oleg,\r\n\r\nThanks for your suggestions.\r\n\r\nI have managed to simulate my issue by using the Echo service as you suggested.\r\nNow the demo is similar to the actual code that I have. \r\nYes, I am using json data from server with loadonce:true option and I apply the filter on the local data after it has been loaded from the server.\r\nAfter Edit, I send the data back to server in order to perform some updates.\r\n\r\nThe demo is located here,\r\nhttp://jsfiddle.net/AshK14/dj35p611/3/\r\n\r\nAs you can see from the demo, after we update and reload from server, the selections of multiselect widget are lost. However the other filtertoolbar textbox values are retained after reload from server.\r\nSelecting one option however in the multiselect widget, is retained on reload from server.\r\n\r\nAlso, due to some reason, the data is not getting filtered locally with the prevoiusly selected filters on server reload, but I am able to achieve this in the application.\r\n\r\nMy only problem at this point is that the selected checkboxes of the multiselect widget are unchecked if we reload from server after Edit operation and if we had filtered by multiple options and then clicked on Edit. \r\n\r\nPlease let me know your suggestions.\r\n\r\nThanks.\r\n\r\n"}}
{"actor":{"display_login":"AshK14"}}