Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, November 30, 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 Selection Newbie Question
Belinda Zenk
Posts: 8
 
DataGrid Selection Newbie QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Jul 08 1:59 PM
I have a datagrid with the multi select property checked but when I try to loop through the selected items it only returns those visible at the time the command is fired.

example 1: The data grid has 100 records in it and I 'select' the first 50 (but only 20 are visible at any one time on the screen with out scrolling) but datagrid.selection.count only returns 20...???

example 2: The data grid has 100 records in it and 'Select' every 10th item for 10 total (only 2 are visible on the grid at a time with out scrolling) but datagrid.selection.count only returns 2

What am I doing wrong?

Thanks in advance!
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: DataGrid Selection Newbie QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Jul 08 1:07 AM
You aren't doing anything wrong. That's a normal complaint of the datagrid - that particular method of identifying all the rows that are selected is completely marred by the fact that it only returns the visible ones. You might be able to imitate the functionality, though. Build a one-field recordset from scratch that will contain the IDs of the records selected (acting like a collection in a compiled language), then attach a function to either the OnClick event or the OnRowSelect event of the datagrid, and determine whether to add or remove an ID from the recordset in that function. I haven't tried it myself, but it might accomplish what you are looking for. The alternative would be to add an additional column to the datagrid that is a checkbox, and the user can check the boxes rather than select rows (which would update the recordset behind the datagrid), and when you want to determine which records are selected, poll the recordset for all the checked rows.
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: DataGrid Selection Newbie QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Jul 08 8:50 AM
Quote:
Originally posted by Belinda Zenk

I have a datagrid with the multi select property checked but when I try to loop through the selected items it only returns those visible at the time the command is fired.

example 1: The data grid has 100 records in it and I 'select' the first 50 (but only 20 are visible at any one time on the screen with out scrolling) but datagrid.selection.count only returns 20...???

example 2: The data grid has 100 records in it and 'Select' every 10th item for 10 total (only 2 are visible on the grid at a time with out scrolling) but datagrid.selection.count only returns 2

What am I doing wrong?

Thanks in advance!


Enable "Sortable"... this forces ALL records to load into memory
Otherwise, it just "pages"....
--
RJLedger - rjlSystems
"... Customer First .."
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: DataGrid Selection Newbie QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Jul 08 9:33 AM
.Sortable = TRUE

must be checked. PERIOD.

What version of SLX (and it definitely matters, you may have to upgrade).
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: DataGrid Selection Newbie QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Jul 08 10:32 AM
I stand corrected
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: DataGrid Selection Newbie QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jul 08 8:27 PM
No big deal...
Sortable turns out to be the answer to a lot of datagrid issues...

rjl
[Reply][Quote]
Belinda Zenk
Posts: 8
 
Re: DataGrid Selection Newbie QuestionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jul 08 10:48 AM
Thank you soooo much! Works as expected now!

Great Group!
[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/30/2024 1:28:16 AM