Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Property Grid - Dynamic List ComboBox, Validation, and More

, 25 Sep 2009
A PropertyGrid implementation showing how-to use, best practices, validation, and more.
propertygrid-demo.zip
PropertyGrid - Demo
CarApplication.exe
CustomControls.dll
DataModel.dll
Utilites.dll
propertygrid-source.zip
PropertyGrid-Source
CarApplication
Converters
Properties
Settings.settings
View
CustomControls
ComboBox
Data
Properties
Rule
DataModel
CarModel
Cars
Wheels
Falken
Kumho
PersonModel
Properties
Utilites
Properties
propertygrid_-_demo.zip
CarApplication.exe
CustomControls.dll
DataModel.dll
Utilites.dll
propertygrid_-_source.zip
PropertyGrid
CarApplication
Converters
Properties
Settings.settings
View
CarDomainModel
Cars
Properties
Wheels
Falken
Kumho
CustomControls
ComboBox
Data
Properties
Rule
DataModel
CarModel
Cars
Wheels
Falken
Kumho
Properties
PersonModel
PersonDomainModel
Properties
PropertyGrid.suo
Utilites
Properties
using System;

namespace CustomControls.Rule
{
	[AttributeUsage( AttributeTargets.Field | AttributeTargets.Property )]
	public abstract class RuleBaseAttribute : Attribute
	{
		#region DataMember

		private string _errorMessage;

		#endregion

		#region Properties

		/// <summary>
		/// Get/Set for ErrorMessage
		/// </summary>
		public string ErrorMessage
		{
			get { return ( _errorMessage ); }
			protected set { _errorMessage = value; }
		}

		#endregion

		#region Methods - Public

		/// <summary>
		/// Validate the input data
		/// </summary>
		/// <param name="dataObject"></param>
		/// <returns></returns>
		public abstract bool IsValid( object dataObject );

		#endregion
	}
}

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 Code Project Open License (CPOL)

Share

About the Author

Dave Elliott
Software Developer (Senior) Webbert Solutions
United States United States
Dave is an independent consultant working in a variety of industries utilizing Microsoft .NET technologies.

| Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 25 Sep 2009
Article Copyright 2008 by Dave Elliott
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid