Closed dkyang1004 closed 1 year ago
This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!
This issue will be closed due to inactivity. Thanks for your contribution!
그리드 사용시
,dataSource:{ contentType:"application/json", api: { readData: { url: searchUrl, method: 'GET' } ,modifyData: { url: modifyUrl, method: 'POST' } } },pageOption:{ useClient : true ,perPage: 10 }
그리드 사용시 옵션을 주어 사용중입니다.
저희가 원하는건 전체data를 불러와서 2페이지의 게시물을 수정하다가 1페이지로 이동하여 다른 게시물을 수정하고 다시 2페이지로 왔을때 2페이지에서 수정한 게시물이 초기화 되지 않도록 하기위하여 이렇게 작업하고 있으며 원하는대로 구현이 되었습니다.
문제는 고객이 게시물의 갯수 (perPage) 를 동적으로 사용하고 싶어합니다. ex) 게시판 상단에 게시물 10개보기, 20개보기,50개보기 이런식으로 콤보박스를 만들어서 보여지길 원합니다.
이 부분도 grid.setPerPage(20); 이 함수로 동작이 됩니다. 여기까지는 서버에서 다시 데이터를 받아오지 않습니다.
그런대.. 여기서 다시 검색이 이루어지면.. readData를 통해 다시 조회해오면
grid.setPerPage(20); grid1.readData(1); or grid1.reloadData(); //검색
최초 10개씩 보기로 돌아가 버립니다.
제가 중간에 20개 , 30개로 grid.setPerPage(20); 를 하고 다시 grid1.readData(1); or grid1.reloadData(); //검색 을 해버리면 최초 그리드 생성시 perPage : 10 으로 지정된걸 읽어오는거 같습니다..
해결방법이 있을까요 ㅠ_ㅜ?