コード例 #1
0
ファイル: DSGridView.cs プロジェクト: onurhazar/dscomponents
		/// <summary>
		/// Handles the on header cell tapped.
		/// </summary>
		/// <param name="sender">Sender.</param>
		public void HandleOnHeaderCellTapped (IDSGridCellView sender)
		{
			Processor.CurrentTable.SortByColumn (sender.Processor.ColumnIndex);

			ReloadData (false);

			Processor.RebuildSelection();
		}
コード例 #2
0
        /// <summary>
        /// Dids the double tap.
        /// </summary>
        /// <param name="cell">Cell.</param>
        public void DidDoubleTap(IDSGridCellView cell)
        {
            if (GridView == null)
            {
                return;
            }

            GridView.HandleOnSelectedRowChanged(RowIndex);
            GridView.HandleOnCellDoubleTap(cell);
            GridView.HandleOnRowDoubleSelect(GridRowView);
        }
コード例 #3
0
        /// <summary>
        /// Dids the single tap.
        /// </summary>
        /// <param name="cell">Cell.</param>
        public void DidSingleTap(IDSGridCellView cell)
        {
            if (GridView == null)
            {
                return;
            }

            if (Style == CellStyle.Header)
            {
                GridView.HandleOnHeaderCellTapped(cell);
            }
            else
            {
                GridView.HandleOnCellSingleTap(cell);
                GridView.HandleOnRowSingleSelect(GridRowView);
                GridView.HandleOnSelectedRowChanged(RowIndex);
            }
        }
コード例 #4
0
        /// <summary>
        /// Calculates the position style.
        /// </summary>
        /// <returns>The position style.</returns>
        /// <param name="cell">Cell.</param>
        public CellPositionType CalculatePosStyle(IDSGridCellView cell)
        {
            //1) is top left
            if (cell.Processor.ColumnIndex == 0 && this.PositionType == RowPositionType.Top)
            {
                return(CellPositionType.LeftTop);
            }
            else if (cell.Processor.ColumnIndex == 0 && this.PositionType == RowPositionType.Bottom)
            {
                return(CellPositionType.LeftBottom);
            }
            else if (cell.Processor.ColumnIndex == 0)
            {
                return(CellPositionType.LeftMiddle);
            }
            else if (cell.Processor.ColumnIndex == Columns.Count - 1 && this.PositionType == RowPositionType.Top)
            {
                return(CellPositionType.RightTop);
            }
            else if (cell.Processor.ColumnIndex == Columns.Count - 1 && this.PositionType == RowPositionType.Bottom)
            {
                return(CellPositionType.RightBottom);
            }
            else if (cell.Processor.ColumnIndex == Columns.Count - 1)
            {
                return(CellPositionType.RightMiddle);
            }
            else if (this.PositionType == RowPositionType.Top)
            {
                return(CellPositionType.CenterTop);
            }
            else if (this.PositionType == RowPositionType.Bottom)
            {
                return(CellPositionType.CenterBottom);
            }
            else
            {
                return(CellPositionType.CenterMiddle);
            }

            //return CellPositionType.LeftTop;
        }
コード例 #5
0
ファイル: DSGridView.cs プロジェクト: onurhazar/dscomponents
		/// <summary>
		/// Handles the on cell double tap.
		/// </summary>
		/// <param name="sender">Sender.</param>
		public void HandleOnCellDoubleTap (IDSGridCellView sender)
		{
			OnDoubleCellTap (sender);
		}
コード例 #6
0
ファイル: DSGridView.cs プロジェクト: onurhazar/dscomponents
		/// <summary>
		/// Handles the on cell single tap.
		/// </summary>
		/// <param name="sender">Sender.</param>
		public void HandleOnCellSingleTap (IDSGridCellView sender)
		{
			this.EndEditing (true);

			OnSingleCellTap (sender);
		}
コード例 #7
0
ファイル: DSGridView.cs プロジェクト: onurhazar/dscomponents
 /// <summary>
 /// Handles the on cell single tap.
 /// </summary>
 /// <param name="sender">Sender.</param>
 public void HandleOnCellSingleTap(IDSGridCellView sender)
 {
     OnSingleCellTap(sender);
 }