Click here to Skip to main content
15,891,976 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 4.9M   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 SourceGrid2.Cells
{
	/// <summary>
	/// Interface for informations about a cechkbox
	/// </summary>
	public interface ICellCheckBox
	{
		/// <summary>
		/// Checked status (equal to the Value property but returns a bool). Call the GetValue
		/// </summary>
		/// <param name="p_Position"></param>
		bool GetCheckedValue(Position p_Position);

		/// <summary>
		/// Set checked value, call the Model.SetCellValue. Can be called only if EnableEdit is true
		/// </summary>
		/// <param name="p_Position"></param>
		/// <param name="p_bChecked"></param>
		void SetCheckedValue(Position p_Position, bool p_bChecked);

		/// <summary>
		/// Get the status of the checkbox at the current position
		/// </summary>
		/// <param name="p_Position"></param>
		/// <returns></returns>
		CheckBoxStatus GetCheckBoxStatus(Position p_Position);
	}
}

namespace SourceGrid2
{
	public struct CheckBoxStatus
	{
		public CheckBoxStatus(bool p_CheckEnable, bool p_bChecked, string p_Caption)
		{
			CheckEnable = p_CheckEnable;
			Checked = p_bChecked;
			Caption = p_Caption;
		}
		/// <summary>
		/// Enable or disable the checkbox
		/// </summary>
		public bool CheckEnable;

		/// <summary>
		/// Checked status
		/// </summary>
		public bool Checked;

		/// <summary>
		/// Caption of the CheckBox
		/// </summary>
		public string Caption;
	}
}

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