function ComponentArt_Grid_KeyMovePageUp(){ var oldHighlightedIndex=qqPa.KeyboardIndex; qqPa.PreviousPage(); qqPa.KeyboardIndex=qqPa.CurrentPageIndex*qqPa.PageSize; ComponentArt_Grid_UpdateHighlights(oldHighlightedIndex); }; function ComponentArt_Grid_KeyMovePageDown(){ var oldHighlightedIndex=qqPa.KeyboardIndex; qqPa.NextPage(); qqPa.KeyboardIndex=qqPa.CurrentPageIndex*qqPa.PageSize; ComponentArt_Grid_UpdateHighlights(oldHighlightedIndex); }; function ComponentArt_Grid_KeyMoveHome(){ var oldHighlightedIndex=qqPa.KeyboardIndex; qqPa.KeyboardIndex=qqPa.CurrentPageIndex*qqPa.PageSize; ComponentArt_Grid_UpdateHighlights(oldHighlightedIndex); }; function ComponentArt_Grid_KeyMoveEnd(){ var oldHighlightedIndex=qqPa.KeyboardIndex; qqPa.KeyboardIndex=(qqPa.CurrentPageIndex+1)*qqPa.PageSize-1; ComponentArt_Grid_UpdateHighlights(oldHighlightedIndex); }; function ComponentArt_Grid_KeyMoveDown(){ var oldKeyboardIndex=qqPa.KeyboardIndex; if(oldKeyboardIndex>=qqPa.RecordCount-1){ return; }; if(oldKeyboardIndex=(qqPa.CurrentPageIndex+1)*qqPa.PageSize){ qqPa.KeyboardIndex=qqPa.CurrentPageIndex*qqPa.PageSize; } else if(oldKeyboardIndex==(qqPa.CurrentPageIndex+1)*qqPa.PageSize-1){ qqPa.NextPage(); }; qqPa.KeyboardIndex++; ComponentArt_Grid_UpdateHighlights(oldKeyboardIndex); }; function ComponentArt_Grid_KeyMoveUp(){ var oldKeyboardIndex=qqPa.KeyboardIndex; if(oldKeyboardIndex<=0){ return; }; if(oldKeyboardIndex=(qqPa.CurrentPageIndex+1)*qqPa.PageSize){ oldKeyboardIndex=qqPa.CurrentPageIndex*qqPa.PageSize+1; } else if(oldKeyboardIndex==qqPa.CurrentPageIndex*qqPa.PageSize){ qqPa.PreviousPage(); }; qqPa.KeyboardIndex--; ComponentArt_Grid_UpdateHighlights(oldKeyboardIndex); }; function ComponentArt_Grid_UpdateHighlights(oldHighlightedIndex){ if(oldHighlightedIndex>0){ var oldHighlightedRow=qqPa.Table.GetRow(oldHighlightedIndex); if(oldHighlightedRow){ var qzwj=document.getElementById(qqPa.Id+'_row_'+oldHighlightedRow.qg10); if(qzwj&&qzwj.onmouseout){ qzwj.onmouseout(); }; }; }; var newHighlightedRow=qqPa.Table.GetRow(qqPa.KeyboardIndex); if(newHighlightedRow){ var qzwi=document.getElementById(qqPa.Id+'_row_'+newHighlightedRow.qg10); if(qzwi&&qzwi.onmouseover){ qzwi.onmouseover(); }; }; }; function ComponentArt_Grid_KeyboardSetToItem(grid,index){ grid.KeyboardIndex=index; qqPa=grid; }; function ComponentArt_Grid_KeySelectItem(){ var grid=qqPa,row=grid.Table.GetRow(grid.KeyboardIndex); grid.Select(row); }; var ComponentArt_Grid_Keyboard_Loaded=true;