コード例 #1
0
ファイル: DSGridView.cs プロジェクト: onurhazar/dscomponents
		/// <summary>
		/// Reloads the data.
		/// </summary>
		public void ReloadData (bool clearSelection = true)
		{
			if (clearSelection)
			{

				Processor.ClearSelectedItems(false);
			}

			mRowStart = 0;



			if (m_HeaderView != null)
			{
				m_HeaderView.RemoveFromSuperview ();
				m_HeaderView = null;
			}

			Processor.Reset();

			GC.Collect ();

			this.SetNeedsDisplay ();
			
		}
コード例 #2
0
ファイル: DSGridView.cs プロジェクト: onurhazar/dscomponents
        /// <summary>
        /// Draws the header row.
        /// </summary>
        private void DrawHeaderRow()
        {
            if (this.Theme.HeaderStyle == GridHeaderStyle.Fixed)
            {
                if (mHeaderView == null)
                {
                    mHeaderView = new DSGridRowView(this);
                    mHeaderView.Processor.RowIndex = 0;
                    mHeaderView.Processor.Style    = CellStyle.Header;

                    //var hWidth = Processor.CalculateSize().Width;

                    //mHeaderView.LayoutParameters = new DSAbsoluteLayout.DSAbsoluteLayoutParams (hWidth, Context.ToDevicePixels ((int)this.Theme.HeaderHeight), 0, 0);
                }

                var hWidth = Processor.CalculateSize().Width;
                mHeaderView.LayoutParameters = new DSAbsoluteLayout.DSAbsoluteLayoutParams(Context.ToDevicePixels((int)hWidth), Context.ToDevicePixels((int)this.Theme.HeaderHeight), 0, 0);

                mHeaderView.Initialize();

                if (mHeaderView.Parent == null)
                {
                    this.AddView(mHeaderView);
                }
            }
        }
コード例 #3
0
        /// <summary>
        /// Handles the on row single select.
        /// </summary>
        /// <param name="sender">Sender.</param>
        internal void HandleOnRowSingleSelect(DSGridRowView sender)
        {
            if (IsTrial)
            {
                HandleTrialTap();
            }

            if (sender.RowIndex >= 0)
            {
                OnRowSelect(sender, sender.RowIndex);
            }
        }
コード例 #4
0
        /// <summary>
        /// Handles the on row double select.
        /// </summary>
        /// <param name="sender">Sender.</param>
        internal void HandleOnRowDoubleSelect(DSGridRowView sender)
        {
            if (IsTrial)
            {
                HandleTrialTap();
            }

            if (sender.RowIndex > -1)
            {
                OnRowDoubleTapped(sender, sender.RowIndex);
            }
        }
コード例 #5
0
ファイル: DSGridView.cs プロジェクト: onurhazar/dscomponents
		/// <summary>
		/// Draws the header row.
		/// </summary>
		private void DrawHeaderRow ()
		{			
			if (this.Theme.HeaderStyle == GridHeaderStyle.Fixed)
			{
				if (m_HeaderView == null)
				{
					m_HeaderView = new DSGridRowView (this);
					m_HeaderView.Processor.RowIndex = 0;
					m_HeaderView.Processor.Style = CellStyle.Header;

					m_HeaderView.Frame = new CGRect (0, this.ContentOffset.Y, this.ContentSize.Width, this.Theme.HeaderHeight).Integral ();

				}

				m_HeaderView.Frame = new CGRect (m_HeaderView.Frame.Left, this.ContentOffset.Y, this.ContentSize.Width, this.Theme.HeaderHeight).Integral ();
				m_HeaderView.SetNeedsDisplay ();

				if (m_HeaderView.Superview == null)
					this.AddSubview (m_HeaderView);
			}
		}