public int GetCurrentCellIndex(ICellEnumerationService cellContainerService)
        {
            object key = getKey(cellContainerService);

            EnsureKeyExists(key);
            return(currentCellIndexTable[key]);
        }
        public void SetCurrentCellIndex(ICellEnumerationService cellContainerService, int newIndex)
        {
            object key = getKey(cellContainerService);

            EnsureKeyExists(key);
            currentCellIndexTable[key] = newIndex;
        }
        /// <summary>
        /// Retrieves the actual cell that the data grid holds as 'current'.
        /// </summary>
        /// <returns></returns>
        private UniversalCellInfo GetCurrentCell()
        {
            UniversalCellInfo cell = UniversalCellInfo.Undefined;

            CurrentRowCellEnumerationService = GetRowEnumerationServiceForItem(dataGrid.CurrentItem);
            if (CurrentRowCellEnumerationService != null)
            {
                cell = CurrentRowCellEnumerationService.GetCellInfo(currentCellPosition.GetCurrentCellIndex(CurrentRowCellEnumerationService));
            }

            return(cell);
        }