Populating a combo with a business object


Author
Message
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You'll have to do a "public void FillDTAllCategories()" and inside that method you'll need to call this.FillDataTable() on the business object. When you try to populate a combo using the business object, you need to use a method that will actually populate the business object, not just return a DataTable.



As for the method not showing up, make sure that the namespaces within the designer file matches the namespace within the business object's main code file... If it doesn't you'll have two business objects in two different namespaces, and the type editor for the PopulationDataSourceSettings will only add one to the list.
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I have restarted VS and it still doesn't appear.  I then dropped the business object on the form and made sure that intellisense could find the method and it could.  Any other suggestions?
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Visual Studio can be problematic sometimes and does not allow the design-time reflection (what we use to gather the methods on the business objects) to evaluate properly. All you need to do is build the project and restart Visual Studio. A pain, I know, and we're in the process of moving the design-time reflection over to the Microsoft.VisualStudio.Design.VSTypeResolutionService namespace.



So, when this happens to you, just restart Visual Studio and the method should be there after the restart.
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I have added a method to my business object that returns a datatable so that I can use that method in the pupulationdatasourcesetting property on a combo box.  The problem is when using the builder for that property the method is not in the combo "method to execute".  My method signiture is "public DataTable GetDTAllCategories()" and I have built the project before running the builder.  What am I missing?

Scott

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