2016-08-03 2 views
1

나는 조회 열 드롭 다운의 끝에 버튼을 표시하려고하는 devextreme dxdatagrid에서 작업 중입니다. 클릭하면 팝업이 표시됩니다.dxdatagrid 사용자 정의 조회 열 드롭 다운 내림 버튼으로

문서 섹션에서 검색했지만 관련 항목을 찾지 못했습니다.

피들러 예제가 제공되면 감사드립니다.

+0

샘플 들러 http://jsfiddle.net/wLLastox 여기

룩업 편집기의 하단 버튼을 추가하는 코드/19 / – vickey

답변

3

그리드의 onEditorPreparing 이벤트 핸들러에서 조회 편집기를 사용자 정의 할 수 있습니다. 여기

onEditorPreparing: function(e){ 
     if(e.row.rowType === "data" && e.dataField === "formatID") { 
     var advancedSearchItem = { 
       template: function(){ 
        return $("<div>").dxButton({ 
       text: "Advanced search", 
       onClick: function(args) { 
        alert("click"); 
       } 
       });  
       } 
      }; 

     e.editorOptions.dataSource = e.lookup.items; 
     e.editorOptions.dataSource.push(advancedSearchItem); 
     }   
    }, 

가 jsfiddle 예에 대한 링크이다 : http://jsfiddle.net/jbkabrq3/

관련 문제