{"action":"opened","issue":{"url":"https://api.github.com/repos/axisj-com/axisj/issues/562","labels_url":"https://api.github.com/repos/axisj-com/axisj/issues/562/labels{/name}","comments_url":"https://api.github.com/repos/axisj-com/axisj/issues/562/comments","events_url":"https://api.github.com/repos/axisj-com/axisj/issues/562/events","html_url":"https://github.com/axisj-com/axisj/issues/562","id":76207660,"number":562,"title":"그리드 에서 다중선택하고 getSelectedItem  사용하면 index 값은 제대로 나오는데 item값이 제대로 나오지 않습니다. ","user":{"login":"young-tae","id":12082549,"avatar_url":"https://avatars.githubusercontent.com/u/12082549?v=3","gravatar_id":"","url":"https://api.github.com/users/young-tae","html_url":"https://github.com/young-tae","followers_url":"https://api.github.com/users/young-tae/followers","following_url":"https://api.github.com/users/young-tae/following{/other_user}","gists_url":"https://api.github.com/users/young-tae/gists{/gist_id}","starred_url":"https://api.github.com/users/young-tae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/young-tae/subscriptions","organizations_url":"https://api.github.com/users/young-tae/orgs","repos_url":"https://api.github.com/users/young-tae/repos","events_url":"https://api.github.com/users/young-tae/events{/privacy}","received_events_url":"https://api.github.com/users/young-tae/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-14T02:56:19Z","updated_at":"2015-05-14T02:56:19Z","closed_at":null,"body":"그리드 에서 다중선택하고 getSelectedItem  사용하면 index 값은 제대로 나오는데 item값이 제대로 나오지 않습니다. \r\n\r\n아래 소스에서 getSelectedItem 이버튼을 클릭했을때 위와 같은 현상이 발생합니다. \r\n\r\n<!DOCTYPE html>\r\n<html lang=\"ko\">\r\n<head>\r\n\t<meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1.0, minimum-scale=1\" />\r\n\t<title>AXGrid - AXISJ</title>\r\n\r\n    <meta property=\"og:site_name\" content=\"Axis of Javascript - axisj.com\" />\r\n    <meta property=\"og:description\" id=\"meta_description\" content=\"Javascript UI Library based on JQuery\" />\r\n\r\n    <!-- css block -->\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://cdn.axisj.com/axicon/axicon.min.css\" rel=\"stylesheet\" />\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://dev.axisj.com/ui/arongi/page.css\" />\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://dev.axisj.com/ui/arongi/AXJ.min.css\" />\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"http://dev.axisj.com/ui/arongi/AXGrid.css\" />\r\n\r\n    <style type=\"text/css\">\r\n    </style>\r\n    <!-- css block -->\r\n\r\n    <!-- js block -->\r\n    <script type=\"text/javascript\" src=\"http://dev.axisj.com/jquery/jquery.min.js\"></script>\r\n    <script type=\"text/javascript\" src=\"http://dev.axisj.com/dist/AXJ.min.js\"></script>\r\n  \r\n    <!-- js block -->\r\n\t<style type=\"text/css\">\r\n\t\r\n\t</style>\r\n</head>\r\n\t\r\n<body>\r\n\r\n<div id=\"AXPage\">\r\n\r\n\t<div id=\"AXPageBody\" class=\"SampleAXSelect\">\r\n        <div id=\"demoPageTabTarget\" class=\"AXdemoPageTabTarget\"></div>\r\n\t\t<div class=\"AXdemoPageContent\">\r\n\r\n            <div id=\"grid0\">\r\n                <h2>AXGrid</h2>\r\n                <div id=\"AXGridTarget\" style=\"height:300px;\"></div>\r\n                <div style=\"padding:10px;\">\r\n                    <input type=\"button\" value=\"getSelectedItem\" class=\"AXButton\" onclick=\"fnObj.grid.getSelectedItem();\" />\r\n\t                <input type=\"button\" value=\"추가하기\" class=\"AXButton Red\" onclick=\"fnObj.grid.append();\" />\r\n\t                <input type=\"button\" value=\"삭제하기\" class=\"AXButton Red\" onclick=\"fnObj.grid.remove();\" />\r\n                </div>\r\n\t            <div style=\"padding:10px;\">\r\n\t\t            <input type=\"button\" value=\"forExcel html with filter\" class=\"AXButton\" onclick=\"fnObj.grid.getExcel('html');\" />\r\n\t            </div>\r\n\r\n            </div>\r\n\r\n          \r\n\t\t</div>\r\n\t</div>\r\n\r\n</div>\r\n\r\n<script>\r\n    /**\r\n     * Require Files for AXISJ UI Component...\r\n     * Based\t\t: jQuery\r\n     * Javascript \t: AXJ.js, AXGrid.js, AXInput.js, AXSelect.js\r\n     * CSS\t\t\t: AXJ.css, AXGrid.css, AXButton.css, AXInput.css, AXSelect.css\r\n     */\r\n    var pageID = \"inline-edit\";\r\n    var fnObj = {\r\n        pageStart: function(){\r\n            fnObj.grid.bind();\r\n          \r\n        },\r\n        grid: {\r\n            target: new AXGrid(),\r\n            bind: function(){\r\n                window.myGrid = fnObj.grid.target;\r\n\r\n\t            myGrid.setConfig({\r\n\t\t            targetID : \"AXGridTarget\",\r\n\t\t            sort:false,\r\n\t\t            //fitToWidth:true, // 너비에 자동 맞춤\r\n\t\t            passiveMode:true,\r\n\t\t            passiveRemoveHide:false,\r\n\r\n\t\t            colGroup : [\r\n\t\t\t            {key:\"no\", label:\"번호\", width:\"50\", align:\"center\", formatter:\"checkbox\"},\r\n\t\t\t            {\r\n\t\t\t\t            key:\"_CUD\", label:\"상태\", width:\"50\", align:\"center\"\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"string\", label:\"String\", width:\"200\",\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"text\",\r\n\t\t\t\t\t            maxLength: 5,\r\n\t\t\t\t\t            updateWith: [\"_CUD\"]\r\n\t\t\t\t            }\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"combobox\", label:\"combobox\", width:\"100\",\r\n\t\t\t\t            formatter: function(val){\r\n\t\t\t\t\t            if(Object.isObject(this.value)){\r\n\t\t\t\t\t\t            return this.value.NM;\r\n\t\t\t\t\t            }else{\r\n\t\t\t\t\t\t            return this.value;\r\n\t\t\t\t\t            }\r\n\t\t\t\t            },\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"select\",\r\n\t\t\t\t\t            optionValue: \"CD\",\r\n\t\t\t\t\t            optionText: \"NM\",\r\n\t\t\t\t\t            options:[\r\n\t\t\t\t\t\t            {CD:1, NM:\"김기영\"},\r\n\t\t\t\t\t\t            {CD:2, NM:\"장기영\"},\r\n\t\t\t\t\t\t            {CD:\"3\", NM:\"장서우\"}\r\n\t\t\t\t\t            ],\r\n\t\t\t\t\t            beforeUpdate: function(val){ // 수정이 되기전 value를 처리 할 수 있음.\r\n\t\t\t\t\t\t            // 선택된 값은 \r\n\t\t\t\t\t\t            console.log(val);\r\n\t\t\t\t\t\t            return val;\r\n\t\t\t\t\t            },\r\n\t\t\t\t\t            afterUpdate: function(val){ // 수정이 처리된 후\r\n\t\t\t\t\t\t            // 수정이 된 후 액션.\r\n\t\t\t\t\t\t            console.log(this);\r\n\t\t\t\t\t            }\r\n\t\t\t\t            }\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"combobox2\", label:\"combobox2\", width:\"100\",\r\n\t\t\t\t            formatter: function(val){\r\n\t\t\t\t\t            if(Object.isObject(this.value)){\r\n\t\t\t\t\t\t            return this.value.NM;\r\n\t\t\t\t\t            }else{\r\n\t\t\t\t\t\t            return this.value;\r\n\t\t\t\t\t            }\r\n\t\t\t\t            },\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"AXSelect\",\r\n\t\t\t\t\t            config: {\r\n\t\t\t\t\t\t            reserveKeys: {\r\n\t\t\t\t\t\t\t            options: \"list\",\r\n\t\t\t\t\t\t\t            optionValue: \"CD\",\r\n\t\t\t\t\t\t\t            optionText: \"NM\"\r\n\t\t\t\t\t\t            },\r\n\t\t\t\t\t\t            ajaxUrl: \"selectData-01.php\",\r\n\t\t\t\t\t\t            ajaxPars: \"\",\r\n\t\t\t\t\t\t            onchange: function(){\r\n\t\t\t\t\t\t\t            // inline editor 에 선언한 onchange함수는 AXGrid내부에서 사용하는 onchange 함수로 변경되어 사용할 수 없습니다.\r\n\t\t\t\t\t\t            }\r\n\t\t\t\t\t            },\r\n\t\t\t\t\t            beforeUpdate: function(val){ // 수정이 되기전 value를 처리 할 수 있음.\r\n\t\t\t\t\t\t            // 선택된 값은\r\n\t\t\t\t\t\t            console.log(val);\r\n\t\t\t\t\t\t            return val;\r\n\t\t\t\t\t            },\r\n\t\t\t\t\t            afterUpdate: function(val){ // 수정이 처리된 후\r\n\t\t\t\t\t\t            // 수정이 된 후 액션.\r\n\t\t\t\t\t\t            //console.log(this);\r\n\t\t\t\t\t            }\r\n\t\t\t\t            }\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"date\", label:\"date\", width:\"105\", align:\"center\",\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"calendar\",\r\n\t\t\t\t\t            config: {\r\n\t\t\t\t\t\t            separator: \"/\"\r\n\t\t\t\t\t            },\r\n\t\t\t\t\t            updateWith: [\"_CUD\"]\r\n\t\t\t\t            }\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"money\", label:\"money\", width:\"100\", align:\"right\",\r\n\t\t\t\t            formatter:\"money\",\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"money\",\r\n\t\t\t\t\t            updateWith: [\"number\",\"_CUD\"]\r\n\t\t\t\t            }\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"number\", label:\"number\", width:\"80\", align:\"right\",\r\n\t\t\t\t            formatter:\"money\",\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"number\",\r\n\t\t\t\t\t            updateWith: [\"money\",\"_CUD\"]\r\n\t\t\t\t            }\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"checkbox\", label:\"checkbox\", width:\"50\", align:\"center\",\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"checkbox\",\r\n\t\t\t\t\t            beforeUpdate: function(val){\r\n\t\t\t\t\t\t            return (val == true) ? \"Y\" : \"N\";\r\n\t\t\t\t\t            }\r\n\t\t\t\t            }\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"radio\", label:\"radio\", width:\"50\", align:\"center\",\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"radio\"\r\n\t\t\t\t            }\r\n\t\t\t            },\r\n\t\t\t            {\r\n\t\t\t\t            key:\"finder\", label:\"finder\", width:\"100\", align:\"center\",\r\n\t\t\t\t            editor: {\r\n\t\t\t\t\t            type: \"finder\",\r\n\t\t\t\t\t            formatter: function(){\r\n\t\t\t\t\t\t            return (this.item.finder || \"\");\r\n\t\t\t\t\t            },\r\n\t\t\t\t\t            finder: {\r\n\t\t\t\t\t\t            onclick: function(){\r\n\t\t\t\t\t\t\t            alert(\"새창 열기\");\r\n\t\t\t\t\t\t            }\r\n\t\t\t\t\t            }\r\n\t\t\t\t            }\r\n\t\t\t            }\r\n\t\t            ],\r\n\t\t            colHeadAlign: \"center\", // 헤드의 기본 정렬 값 ( colHeadAlign 을 지정하면 colGroup 에서 정의한 정렬이 무시되고 colHeadAlign : false 이거나 없으면 colGroup 에서 정의한 속성이 적용됩니다.\r\n\t\t            body : {\r\n\t\t\t            onclick: function(){\r\n\t\t\t\t            //trace(this.index);\r\n\t\t\t            }\r\n\t\t            },\r\n\t\t            page: {\r\n\t\t\t            paging: false\r\n\t\t            }\r\n\t            });\r\n\r\n\t            var list = [];\r\n\r\n\t\t\t\tfor(var i = 0 ; i <10; i++){\r\n\t\t\t\t\tlist.push({\r\n\t\t\t            no:i+1,\r\n\t\t\t            string:\" AXGrid \"+i+\"째 줄 입니다.\",\r\n\t\t\t            combobox: 3,\r\n\t\t\t            combobox2: {CD:1, NM:\"김기영\"},\r\n\t\t\t            date: \"2013-01-18\",\r\n\t\t\t            money: 1709401,\r\n\t\t\t            number: 10,\r\n\t\t\t            checkbox: 1,\r\n\t\t\t            radio: 1,\r\n\t\t\t            finder: \"선택\"\r\n\t\t            });\r\n\t\t\t\t}\r\n\r\n                myGrid.setList(list);\r\n                //trace(myGrid.getSortParam());\r\n\r\n            },\r\n            getExcel: function(type){\r\n                var obj = myGrid.getExcelFormat(type, function(){\r\n\t                return this.key != \"no\" && this.key != \"finder\";\r\n                });\r\n                $(\"#printout\").html(obj);\r\n            },\r\n            getSelectedItem: function(){\r\n                trace( this.target.getSelectedItem() );\r\n                toast.push('콘솔창에 데이터를 출력하였습니다.');\r\n            },\r\n\t        append: function(){\r\n\t\t        this.target.pushList(\r\n\t\t\t        {\r\n\t\t\t\t        no:this.target.list.length,\r\n\t\t\t\t        string: \"\",\r\n\t\t\t\t        combobox: {optionValue:1, optionText:\"김기영\"},\r\n\t\t\t\t        date: \"2013-01-18\",\r\n\t\t\t\t        money: 1709401,\r\n\t\t\t\t        number: 10,\r\n\t\t\t\t        checkbox: 1,\r\n\t\t\t\t        radio: 1,\r\n\t\t\t\t        finder: \"선택\"\r\n\t\t\t        }\r\n\t\t        );\r\n\t\t        this.target.setFocus(this.target.list.length-1);\r\n\t        },\r\n\t        remove: function(){\r\n\t\t        var checkedList = myGrid.getCheckedListWithIndex(0);// colSeq\r\n\t\t        if(checkedList.length == 0){\r\n\t\t\t        alert(\"선택된 목록이 없습니다. 삭제하시려는 목록을 체크하세요\");\r\n\t\t\t        return;\r\n\t\t        }\r\n\t\t        this.target.removeListIndex(checkedList);\r\n\t\t        // 전달한 개체와 비교하여 일치하는 대상을 제거 합니다. 이때 고유한 값이 아닌 항목을 전달 할 때에는 에러가 발생 할 수 있습니다.\r\n\t        }\r\n        }\r\n    };\r\n    jQuery(document.body).ready(function() {\r\n        fnObj.pageStart();\r\n    });\r\n</script>\r\n\r\n</body>\r\n</html>\t\t\r\n"}}