public KGFDataCell this[KGFDataColumn theColumn]
    {
        get
        {
            for (int aCounter = 0; aCounter < itsTable.Columns.Count; aCounter++)
            {
                if (itsCells[aCounter].Column.Equals(theColumn))
                {
                    return(itsCells[aCounter]);
                }
            }

            throw new ArgumentOutOfRangeException();
        }
        set
        {
            for (int aCounter = 0; aCounter < itsTable.Columns.Count; aCounter++)
            {
                if (itsCells[aCounter].Column.Equals(theColumn))
                {
                    itsCells[aCounter] = value;
                }
            }

            throw new ArgumentOutOfRangeException();
        }
    }
    /// <summary>
    /// Set sorting column.
    /// </summary>
    /// <param name="theColumn"></param>
    public void SetSortingColumn(KGFDataColumn theColumn)
    {
        itsSortColumn = theColumn;
        itsRepaint    = true;

        if (EventSettingsChanged != null)
        {
            EventSettingsChanged(this, null);
        }
    }
 /// <summary>
 /// Set sorting column by name
 /// </summary>
 /// <param name="theColumn"></param>
 public void SetSortingColumn(string theColumnName)
 {
     foreach (KGFDataColumn aColumn in itsDataTable.Columns)
     {
         if (aColumn.ColumnName == theColumnName)
         {
             itsSortColumn = aColumn;
             itsRepaint    = true;
             break;
         }
     }
 }
 void SortColumn(KGFDataColumn theColumn)
 {
     if (itsSortColumn != theColumn)
     {
         SetSortingColumn(theColumn);
         itsSortDirection = false;
         itsDataTable.Rows.Sort(RowComparison);
     }
     else
     {
         itsSortDirection = !itsSortDirection;
         itsDataTable.Rows.Reverse();
     }
     itsRepaint = true;
 }
示例#5
0
	public KGFDataCell(KGFDataColumn theColumn, KGFDataRow theRow)
	{
		itsColumn = theColumn;
		itsRow = theRow;
		itsValue = null;
	}
示例#6
0
	public bool IsNull(KGFDataColumn theColumn)
	{
		return IsNull(theColumn.ColumnName);
	}
示例#7
0
	public KGFDataCell this[KGFDataColumn theColumn]
	{
		get
		{
			for(int aCounter = 0; aCounter < itsTable.Columns.Count; aCounter++)
			{
				if(itsCells[aCounter].Column.Equals(theColumn))
				{
					return itsCells[aCounter];
				}
			}
			
			throw new ArgumentOutOfRangeException();
		}
		set
		{
			for(int aCounter = 0; aCounter < itsTable.Columns.Count; aCounter++)
			{
				if(itsCells[aCounter].Column.Equals(theColumn))
				{
					itsCells[aCounter] = value;
				}
			}
			
			throw new ArgumentOutOfRangeException();
		}
	}
 public KGFDataCell(KGFDataColumn theColumn, KGFDataRow theRow)
 {
     itsColumn = theColumn;
     itsRow    = theRow;
     itsValue  = null;
 }
 public bool IsNull(KGFDataColumn theColumn)
 {
     return(IsNull(theColumn.ColumnName));
 }
	/// <summary>
	/// Set sorting column.
	/// </summary>
	/// <param name="theColumn"></param>
	public void SetSortingColumn(KGFDataColumn theColumn)
	{
		itsSortColumn = theColumn;
		itsRepaint = true;
		
		if (EventSettingsChanged != null)
			EventSettingsChanged(this,null);
	}
	/// <summary>
	/// Set sorting column by name
	/// </summary>
	/// <param name="theColumn"></param>
	public void SetSortingColumn(string theColumnName)
	{
		foreach (KGFDataColumn aColumn in itsDataTable.Columns)
		{
			if (aColumn.ColumnName == theColumnName)
			{
				itsSortColumn = aColumn;
				itsRepaint = true;
				break;
			}
		}
	}
	void SortColumn(KGFDataColumn theColumn)
	{
		if (itsSortColumn != theColumn)
		{
			SetSortingColumn(theColumn);
			itsSortDirection = false;
			itsDataTable.Rows.Sort(RowComparison);
		}else
		{
			itsSortDirection = !itsSortDirection;
			itsDataTable.Rows.Reverse();
		}
		itsRepaint = true;
	}