티스토리 뷰

카테고리 없음

Kendo autoBind: false

wldnjd2 2024. 1. 4. 15:06

오류 원인
-분석 버튼을 눌렀을때 데이터가 일부만 나오거나 아예 나오지 않음
-분석 버튼을 두번째 눌렀을때 데이터가 제대로 나옴




오류 해결
1. autoBind: false -> autoBind: true로 변경

 

 

 

 

분석 버튼 누르면 위의 에이젝스탐


1.

현재 treeList 정의 해놓을때 schema 정의를 같이 해놨었음

2.

autoBind: false로 설정하면, 그리드는 초기화 중에 데이터 소스를 바인딩 하지 않음

따라서 treeList 초기화할때 정의해놓은 dataSource를 읽지 못하고, setDataSource하면서 정의해준 schema도 읽지 못함

그래서 계층형 데이터를 읽지 못하고, 상위 계층인 ParendLbsCode가 null인 데이터만 표출 되었음

3.

분석 버튼을 두번 눌렀을때 데이터가 제대로 나온 이유는.

dataSource가 변경되는 이벤트가 실행될때 데이터가 바인딩 되었기 때문

 

4. 

그리드에서는 데이터가 잘 나옴
트리리스트에서도 상위 계층은 표출이 되었었음

 

 

 

 

 

 

 

 

 

Ref.

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/autobind#autobind

 

autoBind - API Reference - Kendo UI Grid - Kendo UI for jQuery

autoBind Boolean (default: true) If set to false, the Grid will not bind to the data source during initialization, i.e. it will not call the fetch method of the dataSource instance. In such scenarios data binding will occur when the change event of the dat

docs.telerik.com

 

댓글