****I have a Infragistics UltraWinGrid bound to an EntityCollection.
If I insert a new row and do a adaptor.SaveEntityCollection(EntityCollection);
The changes are persisted to the database (SQL Server). The Infragistics grid however after this shows all the columns for the new row as blanks except the primary key. I am not sure if this is an LLBLGen Pro artifact or a Infragistics UltraWinGriud artificat
Currently to fix this I just refetch a new entitycollection and bind this to the Grid. Is this what one should do or is there a better way?
If I delelete tye contents of a nullable string column, I get this error
Unable to update the data value: Object of type 'System.DBNull' cannot be converted to type 'System.String'.
How does one fix this.
Also If i add more characters than is allowed into a string column I get an overlength error
Unable to update the data value: The value specified will cause an overflow error in the database. Value length: 4. Column max. length: 3
I can easily stop this if I can get the metadata about the entity field in question, namely the length value.
I have looked at the entity class generated by LLBLGen Pro and for a property I can see in comments
/// <summary> The CaseTypeDescription property of the Entity CaseType<br/><br/>
/// </summary>
/// <remarks>Mapped on table field: "CaseType"."CaseTypeDescription"<br/>
/// Table field type characteristics (**type, precision, scale, length**): NVarChar, 0, 0, 50<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String CaseTypeDescription
{
get { return (System.String)GetValue((int)CaseTypeFieldIndex.CaseTypeDescription, true); }
set { SetValue((int)CaseTypeFieldIndex.CaseTypeDescription, value); }
}
How can I retrieve this metadata from within my application?