I've attached the code clock below. I'm trying to fill the object. (FillDataTable) At this time,
SetValue is running and I'm gettinng the error. (It is signed with red on the code block.)
It is interesting that left side of the assignment has a value (valid unitsetid) but right side has null value.
So, casting error. The object has values coming from DB. But there is an assignment (SetValue) which is trying
to assign values on the object which is filled. Normally, After object has values coming from DB, binding mechanism will start.
Why does SetValue run at this time ? What is the meaning of SetValue ?
Is the order of assignment true ? I expect that right side must be left side ? Because, I'm displaying values from DB.
Do you explain the process briefly ? Fill, Bind etc.
private class Field_unitset_id_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
{
public Field_unitset_id_Descriptor() : base("unitset_id") { }
private System.Type _PropertyType = typeof(System.Int32);
public override object GetValue(Object component)
{
return ((Services)component).unitset_id;
}
public override void SetValue(Object component, object Value)
{
((Services)component).unitset_id = (Nullable<System.Int32>Value; (Error : Specified Cast is not valid.)
}
public override System.Type PropertyType
{
get
{
return this._PropertyType;
}
}
public override System.Type ComponentType
{
get
{
return _ComponentType;
}
}
}