Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, April 24, 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!
 Architect Forums - Legacy Development
Forum to discuss SalesLogix legacy development including views, scripts, etc.. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Legacy Development | New ThreadView:  Search:  
 Author  Thread: DataGrid not Populating
Scott Newton
Posts: 11
 
DataGrid not PopulatingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Sep 13 10:53 AM

Lan Version 8.0.0.8553 and I just noticed the Architect version is 8.0.0.8479


I have a DataGrid that is not populating data. The data is there. I verified it via SQL. It is just not showing on the grid.


I had this same exact probem a short while ago but fixed it by doing some copying of other forms, then making changes. Not sure why it ever did fix itself. There should not have been a problem to begin with.


I just did the same sort of thing to fix this current problem, but it did not work.


I'm just looking for a list of some possible reasons why the grid is not populating when the data is there as confimed in SQL. Could the difference in versions have something to do with this?


Thanks.


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: DataGrid not PopulatingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Sep 13 12:50 PM

There could be several reasons at play here:


 


1) Eventing on the form


2) Data you can see in SQL Studio and "expect" to flow into the grid will not - due to security etc,


So, taking these:


1) a) If the form is a data form - make sure you have an object on that form that is the primaryID - basically, something that determines data has changed and the grid should populate. I normally place a hidden edit box on the form bound to the primary ID.


1) b) If the form is a managed form - the grid will need to be refreshed during the WhenChange of the form, otherwise, it will never auto-populate. So, again, in the WhenChange of the form just do datagrid.refresh - as this is called just once (don't do this on data bound forms otherwise it will fire multiple times.


2) Use SLXProfiler.exe to examine the form loading and querying. You should see the data being requested and the actual SQL being sent. It may have a security layer added (meaning that if your grid doesn't then it won't display). Normally, SLXProfiler is the key to this as you can see what is going on (for example, if you don't see anything happen on form open/loading) then see 1(b) above etc.


The version of Architect and SLX.exe will make no difference here (8553 is v8 with SNC 02 and Architect 8479 is original/correct and won't change until SNC Update 09 - to version 8636). This is all normal. See here for versions: http://www.empath-e.com/support/SLXVersions.txt 


 


Hope that helps.


Regards, Mike

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: DataGrid not PopulatingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Sep 13 8:15 PM

Don't forget all of the bindid and related table\field link stuff.....If you are doing your own sql, msgbox it out.....make sure the IDLink variable is correct and populated.


Sub AXFormChange (make sure this is an event on the form!!!)


DIM LinkID, SQL


LinkID = TxtObjectBoundTotheIDField.Text


 


SQL="SELECt...... WHERE ACCOUNTID or Whatever = '" & LinkID  & "' "


 


grid.sql.text = SQL


 


and that's it....


End sub

[Reply][Quote]
Jim Pemberton
Posts: 1
 
Re: DataGrid not PopulatingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 14 8:29 AM

I ran across this last night trying to figure out why something that I have used for years and it worked flawlessly started giving me fits, so I thought I would chime in so if someone else hits this, they do not beta their head against a wall like I did....

On Mike's response on 1b, using a datagrid on a manage form and firing a datagrid refresh on the Change event of the form, in Saleslogix v7.5.4 with a newly created form, I could not get the Change event to fire no matter what I tried.  We had a form that started life in an earlier version of Saleslogix in the same database that the Change event works perfectly on, and in newer versions of Saleslogix the Change event on newly created forms works perfectly.  I finally tracked down another obsure article that someone else had this issue in v7.5.4 as well and couldnot resolve it either.  I added the datagrid refresh to the Open event on the form instead of the Chnge event and everything is now working correctly again.  Not sure why it did not work correctly on the Change event, but it did not.

Hope this helps someone not go through the weirdness that I encountered....


 


Jim

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: DataGrid not PopulatingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 14 8:36 AM

Actually, that's just fired a neuron. If you add to the tAXForm (the container form) an EditBox and then make the text of that the Primary ID (say contactid for example) then it'll work - as the form "changes" each time the primaryid does (unless it's a managed form which is not databound of course).


It's an old trick. I suspect if you go back to your form, do this - your WhenChange will start to work. What you can then do is make the grid Align : alClient and this will hide the box (or hide the control first, either works).

[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): 4/24/2024 2:38:12 AM