Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, May 18, 2024 
 
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: Need a push in the right direction with a custom grid datasource
David Nunnally
Posts: 206
 
Need a push in the right direction with a custom grid datasourceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Sep 15 8:52 AM

I have a 1:M table on the Account that may have no records or many and need to use a fairly complex query to left outer join a bunch of other tables to this one and then display the results in a grid of an Account level tab. I tried to use the new form wizard and create one with a grid but can't seem to get the data as needed so I believe the best way is to query the data directly from SQL. I cant seem to figure out how to setup the form and bind it to the grid. Firstly what type of form should I use? If I right click as choose new form and then add a datagrid I get a properties window that I dont think I need so I cancel it. Do I now add a datasource and if so which kind or am I going down the wrong road here? This is where I get lost and need some guidance. Man this was so much easier in the LAN Client!!!

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Need a push in the right direction with a custom grid datasourceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Sep 15 10:24 AM

The SLX grid is just an ASP.NET DataGridView. It can handle binding SQL to it just fine. You could use a Dataset filled with data directy from SQL just fine. However, it's been a while since I did this and not sure if it still works this way, but I seem to remember that AA would compplain if you didn't set up the datagrid with a datasource when you built the form, but I would create an empty business rule to bind it to, like how I described here http://customerfx.com/article/filtering-a-datagrid-in-saleslogix-web-at-runtime/ 


You should be able to set up the columns in AA using the field names from your SQL data (but if AA complains, I'd just clear the columns and setup at runtime using a loadaction before you populate it with your SQL data. 


One last thing, I don't remember if edit & delete columns work with this method or not, however, they should - but you might need to add Id and InstanceId fields to your SQL query (just alias the table ID for those fields). I guess we'll see if that works Tongue out

[Reply][Quote]
David Nunnally
Posts: 206
 
Re: Need a push in the right direction with a custom grid datasourceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Sep 15 10:27 AM

Yeah, AA complained about everything I tried. I am about ready to take a sledge hammer to it!


I will give this a try and see how far I can get.


Thanks Ryan.

[Reply][Quote]
David Nunnally
Posts: 206
 
Re: Need a push in the right direction with a custom grid datasourceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Sep 15 2:18 PM

Ryan, how do you get the return type of the BR to be object? I do not have that in the drop down for the return type?


Also in the link you posted I was reading the posts and you stated


That’s fine, we can specify that we’ll be returning an object and all will be OK (If the return type is object, you will have some problems with grids. It is better to manually type in the specific return type, like this: Add System.Collections.Generic.IList<Sage.Entity.Interfaces.IAccount> as the return type).


I am confused. How do you manually type that? Also what problems in a grid with the return type object?


 


 

[Reply][Quote]
David Nunnally
Posts: 206
 
Re: Need a push in the right direction with a custom grid datasourceYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Sep 15 2:42 PM

Stupid AA! Arg! I tried typing in the return type but the field to be readonly drop down. After restarting AA I can now type in object or System.Collections.Generic.IList<Sage.Entity.Interfaces.IAccount> so I am on the road now.


 


But I am still curious as to what issues the grid has with object before I smash into it head on!

[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 © 2024 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): 5/18/2024 9:55:53 PM