using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using Ubik.Engine.Client;
namespace StoresAndStockPricing.Controls{
class BoundDataGridViewRow<T> : ICustomTypeDescriptor // , IEditableObject
where T : Individual
{
T _t;
IList<BoundDataGridViewColumn<T>> _columns;
public BoundDataGridViewRow(T t, IList<BoundDataGridViewColumn<T>> columns)
{
if (t == null)
throw new ArgumentNullException("t");
if (columns == null)
throw new ArgumentNullException("columns");
_t = t;
_columns = columns;
}
public T Value
{
get
{
return _t;
}
}
#region ICustomTypeDescriptor Members
public AttributeCollection GetAttributes()
{
throw new Exception("The method or operation is not implemented.");
}
public string GetClassName()
{
throw new Exception("The method or operation is not implemented.");
}
public string GetComponentName()
{
throw new Exception("The method or operation is not implemented.");
}
public TypeConverter GetConverter()
{
throw new Exception("The method or operation is not implemented.");
}
public EventDescriptor GetDefaultEvent()
{
throw new Exception("The method or operation is not implemented.");
}
public PropertyDescriptor GetDefaultProperty()
{
throw new Exception("The method or operation is not implemented.");
}
public object GetEditor(Type editorBaseType)
{
throw new Exception("The method or operation is not implemented.");
}
public EventDescriptorCollection GetEvents(Attribute[] attributes)
{
throw new Exception("The method or operation is not implemented.");
}
public EventDescriptorCollection GetEvents()
{
throw new Exception("The method or operation is not implemented.");
}
public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
{
PropertyDescriptorCollection result = new PropertyDescriptorCollection(null);
foreach (BoundDataGridViewColumn<T> column in _columns)
{
result.Add(column);
}
return result;
}
public PropertyDescriptorCollection GetProperties()
{
return GetProperties(null);
}
public object GetPropertyOwner(PropertyDescriptor pd)
{
throw new Exception("The method or operation is not implemented.");
}
#endregion
}
}
|