By Scott - 11/23/2005
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
|
By StrataFrame Team - 11/23/2005
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.
|
By Scott - 11/23/2005
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?
|
By StrataFrame Team - 11/23/2005
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.
|