|
-
Oct 6th, 2011, 02:58 AM
#1
Thread Starter
New Member
How to add a row on flexgrid
hi! can anyone help me how to add a row on a flexgrid because i have a new table that i created and the table has nothing on it.
HERE'S THE CODE:
SQL = "Select isnull(A.drino,'') As [drino], isnull(A.PONum,'') As [PONum], isnull(A.prodcode,'') As [prodcode], isnull(A.AcctCode,'') As [AcctCode], isnull(B.AcctDesc,'') As [AcctDesc], isnull(A.Debit,0) As [Debit], isnull(A.Credit,0)As [Credit], A.RowID from [" & gDatabaseName & "].dbo.drind_acode A left join [" & gDatabaseNameAccounts & "].dbo.accounts B on A.AcctCode = B.AcctCode where drino = '" & drino & "' and PONum = '" & ponum & "' and prodcode = '" & prodcode & "'"
rs = dbConn.Execute(SQL)
'====SET COLUMNS HIDDEN
fgAccount.set_ColHidden(8, True) 'rowid
fgAccount.Rows = rs.RecordCount + 1
If Not rs.EOF Then
For i = 1 To rs.RecordCount
fgAccount.set_TextMatrix(i, mintLineNum, i)
fgAccount.set_TextMatrix(i, mintDRIno, Trim(rs.Fields("drino").Value) & "")
fgAccount.set_TextMatrix(i, mintPONum, Trim(rs.Fields("ponum").Value) & "")
fgAccount.set_TextMatrix(i, mintProdCode, Trim(rs.Fields("prodcode").Value) & "")
fgAccount.set_TextMatrix(i, mintAcctCode, Trim(rs.Fields("AcctCode").Value) & "")
fgAccount.set_TextMatrix(i, mintAcctDesc, Trim(rs.Fields("AcctDesc").Value) & "")
fgAccount.set_TextMatrix(i, mintDebit, rs.Fields("Debit").Value & "")
fgAccount.set_TextMatrix(i, mintCredit, rs.Fields("Credit").Value & "")
fgAccount.set_TextMatrix(i, mintRowID, Trim(rs.Fields("RowID").Value) & "")
rs.MoveNext()
Next
End If
-
Oct 6th, 2011, 10:07 AM
#2
Re: How to add a row on flexgrid
-
Oct 7th, 2011, 01:21 AM
#3
Thread Starter
New Member
Re: How to add a row on flexgrid
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|