Ian Johnston
|
|
Group: StrataFrame Users
Posts: 77,
Visits: 470
|
I have a view as a BO named cert_viewBO this I set as the BussinessObjectToPopulate and BusinessObjectType, I have selected the search fields and the resultlayout but when I run the browsezDialog no results are returned. Any ideas?
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
OK, some considerations: You mapped your view to Customer_poBO, which is fine, and the cust_pk is been returned, perfect. Your Customer_poBO has a fill method selecting records from the Customers table, I guess it should be from your Customer_po view. Although you won't need to fill this BO to have it working with the BrowseDialog. The BrowseDialog will fill it with the results it gets depending on your search criteria. Your form has the CustomersBO1 as the PrimaryBusinessObject and your controls are bound to this BO properties. This is just fine. But then, your BrowseDialog has the Customer_poBO1 as the BusinessObjectToPopulate. This is not a problem, but once your BrowseDialog brings your search results, this is the BO that will be populated, and not your form's BO, CustomersBO1. Still on your BrowseDialog, you haven't set the SearchFields, and this will definetely throw an error at run time. You need to set them: 
Once you get this working, you will have your Customer_poBO1 populated as soon as you Close the BrowseDialog after having your search results listed and pressing OK. At this stage, you need to use the BrowseDialogClosed event as I have tried to show you earlier on this following post: http://forum.strataframe.net/FindPost20493.aspx Why that? Because your results will have the Customer's PKs that you want to show on your form, so you need to get all the PKs from your populated view and fill your form's primary BO with the records that match this list of PKs from your view. There might be some concepts you could be missing on how the BrowseDialog works. If you haven't done so, the Tutorial on the Help files could help you get a general idea of it. It is under "Application Framework / Getting Started / Tutorials / Creating a WinForms App" Hope it helps.
|
|
|
Ian Johnston
|
|
Group: StrataFrame Users
Posts: 77,
Visits: 470
|
Thanks for looking at it. It is working in that the browse window opens and when I do a search it says 1000 records found but no results are displayed but the rows are there in the grid.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Great, we are getting there. Your issue now seems to be with your CustomerBrowseDetails InformationPanel. You are dealing with its RowChanged event, you are on the right path there, but remember you are not dealing with the Customers BO at this moment, but with the view instead. You can use the current view row PK to go to the Customers table and get the info you are looking for, though. For the sake of making your BrowseDialog work first and get the idea of it, try to comment those lines and focus on getting the BD work and populate your form's primary BO with the rows from your BD results. I did it over here and the BD list populated just fine from the view.
|
|
|
Ian Johnston
|
|
Group: StrataFrame Users
Posts: 77,
Visits: 470
|
I had to comment out the code from CustomerBrowseDetails to get it to work, that was the original code in the sample. When you run the browse you are seeing the actual names and not just blank rows?
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Yep.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Sorry for the question, Ian... but once you entered the BrowseDialog, did you click the Search button?
|
|
|
Ian Johnston
|
|
Group: StrataFrame Users
Posts: 77,
Visits: 470
|
 Yes, don't blame you for asking! Very strange, I am wondering if it is a permission issue on the server. I am getting the exact same result in the app I am working on using a view, no visible result even though it says it found records.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
I asked that just because it happens to me all the time!  Strange result you are getting there... over here, I have created the same view you did over there and haven't done anything to your sample besides creating an enter to the BrowseDialog SearchFields property with the cust_FirstName.
|
|
|
Ian Johnston
|
|
Group: StrataFrame Users
Posts: 77,
Visits: 470
|
Was working and now I just tried to runand got the error in the attachment.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Just open your form's code and get rid of the RowPopulating event handler. Let's deal with this part later.
|
|
|
Ian Johnston
|
|
Group: StrataFrame Users
Posts: 77,
Visits: 470
|
Just curious but what is your development platform, I am using Vista ultimate service pack 2 and Visual studio 2008 version 9.0.30729.1 SP .Net Framework version 3.5 SP1. I believe the BO is loading it is just not displaying, I tried using the view BO in a listview in my applicaton and get the same result.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Right now I am on a Win7 64 Professional with VS2008. But I also have machines with Vista and with XP Pro. I don't think this is the issue. Have you had success building a plain BrowseDialog on a normal table?
|
|
|
Ian Johnston
|
|
Group: StrataFrame Users
Posts: 77,
Visits: 470
|
Browse dialog in the sample form works. What version of stratafarme & SQL server?
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Well, that is a good sign then. It should work just as well with your views, and as a matter of fact I used the sample you posted and it worked over here. I am currently on StrataFrame 1.7.0.7 and SQL Server 2008.
|
|
|
Ian Johnston
|
|
Group: StrataFrame Users
Posts: 77,
Visits: 470
|
I tried my code on the same plaform as you, same result - still not displaying the items in the browse. I am not going to use the browse dialog in the application, Thanks for taking the time to look at it but I am up against a deadline.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
I understand. But as soon as you want to come back to this, let us know.
|
|
|