2017-01-24 2 views
0

dhtmlxgrid를 사용하지만 onRowSelect을 사용하면 첫 번째 행이 선택되지 않지만 이벤트는 onRowDblClicked을 사용하여 잘 동작하거나 키보드 탐색을 사용합니다. 그러나 키보드를 사용하여 첫 번째 행으로 이동하면 탐색이 중단되고 키보드를 사용하여 첫 번째 행에서 탐색 할 수 없지만 다른 행을 클릭하면 정상적으로 작동합니다. 여기 내 코드 :dhtmlxgrid java의 오류

function onGraphPropGridRowSelect(id) 
{ 
    // push the previously selected graph's data to the JSON array object 
    if(lastSelectedGraphIndex != -1) 
    { 
     if(validateGraphProperties()) 
     { 
      // Note: GraphType is uneditable, so just copy existing value 
      pushGraphPropertiesToJSONArr(lastSelectedGraphIndex, 
             graphPropertiesJson[lastSelectedGraphIndex].GraphType); 
     }else 
     { 
      definedGraphGrid.selectRow(definedGraphGrid.getRowIndex(lastSelectedGraphIndex)); 
      return false; 
     } 
    } 
    // now populate the newly selected graph data to the UI elements 
    populateUIElementsForSelectedGraph(id); 
    // update the lastSelectedGraphIndex to the newly selected graph index 
    lastSelectedGraphIndex = id; 
    if (id==0){ 
     definedGraphGrid.enableKeyboardSupport(true); 
     alert("first row selected"); 
    } 
} 

답변

0

불행히도 "0"을 행의 ID로 사용할 수 없습니다. 다른 ID를 사용해보십시오.

관련 문제