Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 29, 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 - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: DataGrid Primer: quiet down the grid and speed up the display
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
DataGrid Primer: quiet down the grid and speed up the displayYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jan 09 8:05 AM
SLX Grid Efficiencies.

Overview:
Data Grids (grid) are a standard design element for displaying a 1:M list of records.
1 Account:Many Contacts....display the Account's Contacts in a grid on a form.

Programmatically:
Grid displays are filled in by a grid method: REFRESH. Up until SLX 7.2,
Grid Refreshes were 'fired off' by a simple script:

Sub ABC
gridname.REFRESH
END SUB

Now in 7.2+ SLX is firing Grids off:
a) gridname.REFRESH
b) When the GridName.BINDID changes (if the BINDID is the AccountID, then changing to a different account changes the Bindid, and the Grid Refreshes.
c) When the BINDID is specified in the GridName.SQL.TEXT (ACCOUNTID = :BINDID).
d) When the GridName.RecordSet is set to a new RecordSet.

In the past, if you:
GridName.BINDID = strACCOUNTID
GridName.SQL.TEXT = "SELECT ......"
GridName.REFRESH

SLX would fire off the Refresh ONCE. Now it does it 3 or 4 times.

With 5 rows, no big deal. With 14,000 rows, this is a real problem.

Issue: slow grid refreshes, user waiting, nothing happening to the screen, SLX appears frozen.

Solutions:
1. Quiet down the grid, limit the number of refreshes, and speed up the grid display.
2. Make sure that the SELECT and joins are as efficient as possible. Limit the number of columns, rows, use indexed fields for joins. Look into record set refreshes. Utilize SQL Native Connections where applicable.
3. Provide 'waiting messages' and progress bars to the user. Hide controls that we don't want the user to click on when the data is being retrieved and the grid display being built.

Implementation of solutions:
1. Quiet Down The Grid
a) remove BINDID property from Grid. Careful: make sure you have an invisible Edit Box data bound to the table ID field on the base of the form! This fires off the AXFormChange.
b) remove BINDID reference in the SQL Property
c) in the AXFormOpen of the Form itself, set the GridName.SQL.TEXT = ""
d) in the AXFormChange of the Form itself, set the SQL.TEXT and that fires off the grid!
e) when you want to fire off the grid AGAIN either do a
SET GridName.RecordSet = yourADORS
OR
GridName.SQL.TEXT = "Select ...... WHERE ACCOUNTID = '" & strBINDID & "' "
>>> DO NOT DO a .REFRESH after this!
OR
.REFRESH
OR
Application.BasicFunctions.REFRESHMainView

Never more than one of these, unless absolutely necessary!

2. Efficient SQL: for read only data displays, use a SQL Connection rather than a SLX Database Connection.

3. Just before you do the refresh, set panels and displays to .VISIBLE = FALSE. after the Refresh, set controls back to .VISIBLE = TRUE

4. Testing: Run SLXProfile.exe and watch how many grid selects you are running on a form. Do this on the old form as well as the new form.

[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): 11/29/2024 9:27:05 PM