37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
|
|
namespace BCG
|
|
{
|
|
/// <summary>
|
|
/// Used by GridBindableBlueTable to
|
|
/// </summary>
|
|
public class BlueDataPropertyDescriptor : PropertyDescriptor
|
|
{
|
|
private ColumnInfo myColumnInfo;
|
|
|
|
public BlueDataPropertyDescriptor (ColumnInfo ci)
|
|
: base (ci.colName, new Attribute[]{})
|
|
{
|
|
myColumnInfo = ci;
|
|
}
|
|
|
|
public override bool IsReadOnly {get{return true;}}
|
|
|
|
public override Type PropertyType {get{return myColumnInfo.colType;}}
|
|
|
|
public override bool CanResetValue (object component) {return false;}
|
|
|
|
public override object GetValue (object component) {return (component as IBlueRow)[myColumnInfo.colName];}
|
|
|
|
public override void ResetValue(object component) {}
|
|
|
|
public override void SetValue(object component, object value) {}
|
|
|
|
public override bool ShouldSerializeValue(object component) {return false;}
|
|
|
|
public override Type ComponentType {get {return typeof(IBlueRow);}}
|
|
|
|
}
|
|
}
|