Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 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!
 External Development Forums - Design & Architecture Topics
Forum to discuss designing applications to work with SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Design & Architecture Topics | New ThreadView:  Search:  
 Author  Thread: re: passing data
Chokri
Posts: 62
 
re: passing dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Feb 07 6:28 AM
fiogf49gjkf0d
Using Saleslogix v6.1 and Architect 6.1

I have a data grid with the a number of fields, the field in question is the 'Subscription Number'
I also have an add/edit form attached to that data gird
In my add/edit form I have a lookup field on the 'Subscription Number' where the end user selects the relevant Subscription Number, once selected this number is then displayed in the 'Subscription Number' on the Add/Edit form however on save I wish to pass the selected 'Subscription Number' to the 'Subscription Number' field on the data grid. Any assistance on this would be appreciated. Thanks.
[Reply][Quote]
Rekha
Posts: 72
 
Re: re: passing dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jul 07 3:32 AM
If you want to get only the id from grid, you can use
datagrid1.GetCurrentField("AccountID").

if you want other columns in grid other than id field, then it will work only if the datagrid is dynamic and not configured through saleslogix. you need to write query and bind it manually like below:

Function Fillgrid
Dim rs
Dim col
Dim fld
Dim i
Dim strSQL
With datagrid
strSQL = "SELECT Account.Account,Account.Accountid, Account from Account "


' Remove any existing columns
IF (.Columns.Count > 0) Then
For i = 0 To .Columns.Count - 1
.Columns.Item(0).Delete
Next

END IF
' Add new SQL and refresh so grid is bound


.SQL.Text = strSQL

.Refresh

' Pull the recordset from grid to determine fields in query
Set rs = .Recordset
For Each fld In rs.Fields
Set col = .Columns.Add(0)
col.FieldName = fld.Name
col.Caption = fld.Name

Next
.ReadOnly = True
.Rowselect = True
End With

End function
[Reply][Quote]
Rekha
Posts: 72
 
Re: re: passing dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jul 07 3:39 AM
Thanks to Ryan farley for dynamic datagrid code
[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/26/2024 2:21:01 AM