2017-01-24 17 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

残念ながら、行のIDとして "0"を使用することはできません。別のIDを使用してみてください。