Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, August 14, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Associating 2-grids as a 1:N
Ken Poggensee
Posts: 71
 
Associating 2-grids as a 1:NYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Oct 08 11:54 AM
HiYa Gurus,

I am looking for some best practices on how to do this…

I have a tab view that has 2-grids on it. The first grid is SalesOrders and the second grid is the SalesOrdersDetails. When a record is selected in the first grid, I want it to show the associated line items in the second grid. This would obviously be a simple answer in the Lan Client, but am struggling with how to do this in the web.

I am pretty sure that I need to create a business rule to do this but not sure what I need to do. Do I just assign the business rule to the [GetByMethod] of the second data source? Will that automatically refresh as items are selected from the first grid?

Does anyone have a code snippet or advice they could share that would get me in the right direction?

--Ken--
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Associating 2-grids as a 1:NYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Oct 08 3:33 AM
Hi Ken,

I must confess I havent had to do this yet, but I would have though the way you have mentioned wouldnt work - I dont think it would be clever enough to automatically refresh the second grid without you telling it what to do.

Personally, I would create a quickform with the two grids on, with all their columns etc already set up (to save manually writing the code for them). Add the select button so SLX will even write the event handling code for you. Then reimport it after deploying and make it a custom smartpart so you can edit the methods properly. Then inside the event handling code for the select click on the first grid, you can call and update your datasource for grid two, and call a databind for your second grid. This will refresh it. Depending on how your business rule is set up you may have to pass in the selected entity in grid one into the business rule for grid 2. You will have the ID of the selected record, just use the EntityFactory to create an instance of the entity you require and pass it in.

Just make sure your business rule returns the necessary values for grid 2.

When I had to do something similar I used SQLDataSource (using good ol' plain SQL) - a bit simpler if you are coming from the LAN world, as opposed to a business rule, but I would encourage getting used to using business rules to return lists as this is just the way it should be in the new web

Cheers,
Nick
[Reply][Quote]
Ken Poggensee
Posts: 71
 
Re: Associating 2-grids as a 1:NYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Oct 08 11:09 AM
Sweet... Thanks Nick. I will give that a try and see what happens.
[Reply][Quote]
Ken Poggensee
Posts: 71
 
Re: Associating 2-grids as a 1:NYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Oct 08 11:09 AM
.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/14/2025 5:33:42 AM