Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Janus Grid displaying records in unbound mode
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Janus Grid displaying records in unbound mode
Divers
Thread ID:
00682140
Message ID:
00682140
Vues:
147
The grid displays nicely, ‘cept the records values are not displayed until I start moving from row to row using any means.

What am I missing?

Refer to code below.
TIA


Creating the columns:

Local loColTemp
This.Columns.Clear
*
* PK Column
*
loColTemp = This.Columns.Add("Key", jgexText, jgexEditTextBox, "LastName")
loColTemp.Visible = .F.
loColTemp.Width = 1
*loColTemp.EditType = jgexEditNone && No Editing Allowd
*
* Check Box
*
loColTemp = This.Columns.Add("",jgExCheckBox , jgexEditCheckBox, "Selected")
loColTemp.Width = 500
*
* Display Text
*
loColTemp = This.Columns.Add("Descripton",jgexText ,jgexEditTextBox , "Description")
loColTemp.Width = 5000
loColTemp.EditType = jgexEditNone && No Editing Allowd
loColTemp = .null.
Return

In unbound mode I am using an array to populate the values. The code is:

Local loRS,lcCommand,lnCounter,loBizObj
lnCounter = 1
loBizObj = NewObject(This.cPopulateClass,This.cPopulateClasslib)
lcCommand = "loBizObj."+This.cPopulateMethod+'()'
loRS = &lcCommand
With loRS
*Populating from a recordset
If loRS.RecordCount > 0
Dimension This.aValues[3,loRs.RecordCount]
.MoveFirst()
Do While !.Eof
This.aValues[1,lnCounter] = loRS.Fields(This.cPopulatePrimaryKey).Value
This.aValues[2,lnCounter] = .F.
This.aValues[3,lnCounter] = loRS.Fields(This.cDisplayField).Value
lnCounter = lnCounter + 1
.MoveNext()
Enddo
Endif
Endwith
This.ItemCount = Alen(This.aValues,2)
loRS = .Null.
loBizObj = .null.
Return



In the UnboundReadData Event:



LPARAMETERS rowindex, bookmark, values
Values.value(1) = This.aValues(1, RowIndex)
Values.Value(2) = Iif(This.aValues(2, RowIndex),-1,0)
Values.value(3) = This.aValues(3, RowIndex)
Return




TIA
Mark S. Swiencki
EPS Software www.eps-software.com
mark@eps-software.com
Répondre
Fil
Voir

Click here to load this message in the networking platform