Custom Field Missing


Author
Message
Jeff Pagley
Jeff Pagley
StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)
Group: StrataFrame Users
Posts: 223, Visits: 893
When I am binding the BO.CurrentDataTable to Strataframe.DevEx.ComboBox, the custom field is missing.

Here is the code I am using for binding.  The custom field name is "DisplayDescription".

using (CostCodesBO loBO = new CostCodesBO())

{

loBO.FillAll();

cboCostCodes.ValueMember =
"coco_PK";

cboCostCodes.DisplayMember =
"DisplayDescription";

cboCostCodes.DataSource = loBO.CurrentDataTable;

}

Here is the BO Custom Field code:

protected override MicroFour.StrataFrame.Business.FieldPropertyDescriptor[] GetCustomBindablePropertyDescriptors()

{

//--Create and return a new array of FieldPropertyDescriptor objects

return new MicroFour.StrataFrame.Business.FieldPropertyDescriptor[] {

new MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor("DisplayDescription", typeof(CostCodesBO))};

}

/// <summary>

/// DisplayDescription

/// </summary>

/// <remarks></remarks>

[Browsable(false), BusinessFieldDisplayInEditor(), Description("DisplayDescription"), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]

public System.String DisplayDescription

{

get

{

return String.Format("{0} {1}", this.coco_Number, this.coco_Description);

}

}


Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Did you build the app after adding the custom field?  And you are using standard ADO.NET binding. Why are you using the SF PopulationDataSourceSettings that you'd set in the UI?
Tags
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Jeff,

Adding to Greg's question, shouldn't you be using a SF BusinessBindingSource to bind your grid instead of the BO's data table?

Edhy Rijo

Jeff Pagley
Jeff Pagley
StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)
Group: StrataFrame Users
Posts: 223, Visits: 893
Greg,

Sorry guys, I had a lapse in memory.  The SF PopulationDataSourceSettings is exactly what I wanted to use.

Thanks,

Jeff
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Glad that fixed it!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search