Click here to Skip to main content
15,897,273 members
Articles / Programming Languages / C#

SourceGrid - Open Source C# Grid Control

Rate me:
Please Sign up or sign in to vote.
4.94/5 (429 votes)
4 Aug 2013MIT24 min read 5M   23.7K   1K  
SourceGrid is a free open source grid control. Supports virtual grid, custom cells and editors, advanced formatting options and many others features
using System;

namespace SourceGrid
{
	/// <summary>
	/// Selection Mode
	/// </summary>
	public enum GridSelectionMode
	{
		Cell = 1,
		Row = 2,
		Col = 3
	}

	/// <summary>
	/// Sort Mode
	/// </summary>
	public enum GridSortMode
	{
		None = 0,
		Ascending = 1,
		Descending = 2
	}

	/// <summary>
	/// ContextMenu
	/// </summary>
	[Flags]
	public enum GridContextMenu
	{
		None = 0,
		ColumnResize = 1,
		RowResize = 2,
		AutoSize = 4,
		ClearSelection = 8,
		CopyPasteSelection = 16//,
		//PropertySelection = 32
	}


	/// <summary>
	/// Editable Cell mode
	/// </summary>
	[Flags]
	public enum EditableMode
	{
		/// <summary>
		/// No edit (0)
		/// </summary>
		None = 0,
		/// <summary>
		/// Edit the cell with F2 key ( 1 )
		/// </summary>
		F2Key = 1,
		/// <summary>
		/// Edit the cell with a double click (2)
		/// </summary>
		DoubleClick = 2,
		/// <summary>
		/// Edit a cell with a single Key (4)
		/// </summary>
		SingleClick = 4,
		/// <summary>
		/// Edit the cell pressing any keys (8 + F2Key)
		/// </summary>
		AnyKey = 9,
		/// <summary>
		/// Edit the cell when it receive the focus (16)
		/// </summary>
		Focus = 16
	}

	/// <summary>
	/// Border Style
	/// </summary>
	public enum CommonBorderStyle
	{
		Normal = 1,
		Raised = 2,
		Inset = 3
	}

	/// <summary>
	/// Type of resize of the cells
	/// </summary>
	[Flags]
	public enum CellResizeMode
	{
		None = 0,
		Height = 1,
		Width = 2,
		Both = 3
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions