Custom Field Missing

Author Message
 Posted 12/1/2010 2:11:03 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 5/18/2018 4:41:35 AM
Posts: 223, Visits: 894
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);

}

}

Post #29134
Add to Twitter Add to Facebook
 Posted 12/1/2010 5:12:20 AM
Strategic Support Team Member

Strategic Support Team Member

Group: Forum Members
Last Login: 10/6/2011 5:13:18 AM
Posts: 2,019, Visits: 6,605
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:
Post #29137
Add to Twitter Add to Facebook
 Posted 12/1/2010 5:20:48 AM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: 1/19/2021 11:57:36 AM
Posts: 2,436, Visits: 24,158
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
(Using VB.Net 2019/SQL Server 2017)
Post #29138
Add to Twitter Add to Facebook
 Posted 12/1/2010 7:19:21 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 5/18/2018 4:41:35 AM
Posts: 223, Visits: 894
Greg,

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

Thanks,

Jeff
Post #29140
Add to Twitter Add to Facebook
 Posted 12/1/2010 8:31:17 AM
Strategic Support Team Member

Strategic Support Team Member

Group: Forum Members
Last Login: 10/6/2011 5:13:18 AM
Posts: 2,019, Visits: 6,605
Glad that fixed it!
Post #29141
Add to Twitter Add to Facebook


Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.