Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, November 21, 2024 
 
View User Profile  

 User Profile - Ravindra G  
Ravindra G
Getronics

fjrigjwwe9r1SiteUser:UserBio
fiogf49gjkf0d
Working on Sales Logix 6.2.6.1007


Log in to send this member a message!
 


 Ravindra G's Contributions
Ravindra G has contributed 1 comments and 0 articles.
 
Select to view:    
Comment: Re: Dynamically Creating DataGrid Columns
fiogf49gjkf0d
Hi Guys,

I am not able to edit the datagrid means it always readonly. Please find my code below which i am trying. I am working on the version 6.2.6.1007. Guys please advise why i am not able to edit the grid is there any other way which i can use to edit the grid.

Details: Bind id is bound to contactid.
and key filed is contactid also for the grid.


Sub BuildDataGrid
Dim col,i
Dim strSQL
Dim rs
Dim fld
strSQL = "SELECT PAM.PROCESSAUDITMASTERID,CP.ISSELECTED,PAM.STAGENAME + ' - ' + CONVERT(VARCHAR,PAM.PROBABILITY,20) + '%' STAGE,PAM.STEPNAME,CP.DESCRIPTION," _
& "CP.STARTEDON,CP.COMPLETEDON FROM sysdba.PROCESSAUDITMASTER PAM LEFT JOIN sysdba.CONTACTPROCESS CP ON " _
& "(PAM.PROCESSAUDITMASTERID = CP.PROCESSMASTERAUDITID AND CP.CONTACTID = " & "'" & Application.BasicFunctions.CurrentContactID & "'" & ")"

with grdCampaign
If (.Columns.Count > 0) Then
For i = 0 To .Columns.Count - 1
.Columns.Item(0).Delete
Next
End If
.SQL.Text = strSQL
.Refresh
.ReadOnly = False
Set rs = .Recordset
For Each fld In rs.Fields
if fld.Name = "ISSELECTED" then
Set col = .Columns.Add(4)
col.Valuechecked = True
col.valueunchecked = False
col.Caption = Application.Translator.Localize("Select")
col.width= 50
ELSEIF fld.Name = "PROCESSAUDITMASTERID" then
SET col = .Columns.Add(0)
col.Caption = fld.Name
col.FieldName = fld.Name
col.width= 10
col.Visible = false
ELSEIF fld.Name = "STAGE" then
SET col = .Columns.Add(0)
col.Caption = fld.Name
col.FieldName = fld.Name
col.width= 180
ELSEIF fld.Name = "STARTEDON" OR fld.Name = "COMPLETEDON" then
SET col = .Columns.Add(3)
col.Caption = fld.Name
col.FieldName = fld.Name
col.width= 150
ELSE
SET col = .Columns.Add(0)
col.Caption = fld.Name
col.FieldName = fld.Name
col.width= 300
END IF
Next
.ReadOnly = False
.Refresh
end with
End Sub

Author: Ravindra G - 1/10/2008

 


 
 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/21/2024 7:25:06 PM