Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Checkbox on Dynamic Grid not Working..........
Joe Poteet
Posts: 7
 
Checkbox on Dynamic Grid not Working..........Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jan 08 12:56 PM
Hello all .....

I have a dynamic grid with a few fields on it....one of them being a checkbox field. The checkbox is not bound to any table fields....Will this work?
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Checkbox on Dynamic Grid not Working..........Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 08 5:08 PM
What do you mean by "work"?

Since the checkbox is not bound you will have to handle it all in code.

--
RJLedger - rjlSystems.net
[Reply][Quote]
Joe Poteet
Posts: 7
 
Re: Checkbox on Dynamic Grid not Working..........Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 08 5:12 PM
So I am able to build the column as follows:

Set col = .Add(4)
col.Caption = "Select"
col.ReadOnly = False
col.Width = 30

But no matter what I do the checkbox will not let me toggle. It just stays blank no matter how many times clicked. I thought it might have been due to being unbound from a field. Am I missing something?

Thanks,

JP
[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Checkbox on Dynamic Grid not Working..........Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 08 2:07 AM
Set sortable = true on the data grid?

[Reply][Quote]
Joe Poteet
Posts: 7
 
Re: Checkbox on Dynamic Grid not Working..........Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 08 9:32 AM
As of now no....would that make a difference? I will try it and see if that helps.
[Reply][Quote]
Joe Poteet
Posts: 7
 
Re: Checkbox on Dynamic Grid not Working..........Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 08 9:45 AM
Setting the grid to sortable did not seem to work. As of now the CheckBox shows up but remains blank no matter what.....below is some of the code:

'Build Grid Dynamically
Dim col
Dim i
Dim strSql

' Run SQL for search parameters
With grdSearch
strSql = "SELECT DISTINCT 'F' AS SLC, C.ACCOUNT, C.FULLNAME, C.CONTACTID FROM sysdba.CONTACT C JOIN ADDRESS A ON A.ENTITYID = C.ACCOUNTID WHERE NOT (C.CONTACTID IN(SELECT CONTACTID FROM sysdba.C_COMM_RECIPS WHERE C_COMMUNICATIONSID = '" & form.CurrentID & "'))"
strSql = strSql & " AND C.FIRSTNAME LIKE '" & edtFirstName.Text & "%'"
strSql = strSql & " AND C.LASTNAME LIKE '" & edtLastName.Text & "%'"
strSql = strSql & " AND C.STATUS LIKE '" & pklStatus.Text & "%'"
strSql = strSql & " AND C.ACCOUNT LIKE '" & edtCompany.Text & "%'"
strSql = strSql & " AND A.CITY LIKE '" & edtCity.Text & "%'"
strSql = strSql & " AND A.STATE LIKE '" & pklState.Text & "%'"
If cbkPrimaryOnly.Text = "T" THEN
strSql = strSql & " AND A.ISPRIMARY = 'T'"
End If

.SQL.Text = strSql
lblRecordsShown.Caption = "Results Found: " & grdSearch.Recordset.RecordCount
With .Columns
'remove any existing columns
If (.Count > 0) Then
For i = 0 To .Count - 1
.Item(0).Delete
Next
End If

'add column for SELECT
Set col = .Add(4)
col.Caption = "Select"
col.FIeldName = "slc"
col.ReadOnly = False
col.Width = 30


'add column for ACCOUNT field
Set col = .Add(0)
col.FieldName = "account"
col.Caption = "Company"
col.ReadOnly = True
col.Width = 200

'add column for FULLNAME field
Set col = .Add(0)
col.FieldName = "fullname"
col.Caption = "Contact"
col.ReadOnly = True
col.Width = 200

'add column for CONTACTID field
Set col = .Add(0)
col.FieldName = "contactid"
col.Caption = "ContactID"
col.Visible = False

End With
'now refresh the grid to see the new columns
.Refresh
End With


Thanks,

JP
[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Checkbox on Dynamic Grid not Working..........Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 08 6:25 PM
I think that building the recordset that way may make the Recordset a forward only one so it is therefore read-only.

Try this:

(Do this anyway) - remove the "sysdba." from your SQL, they are not necessary.

Dim rs
Set rs = CreateObject("ADODB.Recordset")
rs.CursorLocation = 3

rs.Open txtQuery.value, cn, 3, 4

Set DataGrid1.Recordset = rs

You will be able to check on bound check boxes then. So you need to use a field to store your check answers.

Also, this will probably need a .UpdateBatch call to write back to the database if you need that.


Stephen


[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/18/2025 5:31:16 PM