PdcDataGrid: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Methods == PdcDataGrid.FirstRecord<br /> PdcDataGrid.GetField<br /> PdcDataGrid.GetFile<br /> PdcDataGrid.GetImage<br /> PdcDataGrid.LastRecord<br /> [[..." |
No edit summary |
||
Line 16: | Line 16: | ||
[[PdcDataGrid.GridName]]<br /> | [[PdcDataGrid.GridName]]<br /> | ||
[[PdcDataGrid.SelectedValues]]<br /> | [[PdcDataGrid.SelectedValues]]<br /> | ||
[[PdcDataGrid.SelectionKey]] | [[PdcDataGrid.SelectionKey]]<br /> | ||
[[PdcDataGrid.TableName]] | |||
== Notes == | == Notes == |
Latest revision as of 13:20, 26 June 2017
Methods
PdcDataGrid.FirstRecord
PdcDataGrid.GetField
PdcDataGrid.GetFile
PdcDataGrid.GetImage
PdcDataGrid.LastRecord
PdcDataGrid.Locate
PdcDataGrid.NextRecord
PdcDataGrid.PriorRecord
PdcDataGrid.RecordCount
Properties
PdcDataGrid.BoF
PdcDataGrid.EoF
PdcDataGrid.FieldNames
PdcDataGrid.GridName
PdcDataGrid.SelectedValues
PdcDataGrid.SelectionKey
PdcDataGrid.TableName
Notes
This property returns the active datagrid in the active window.
Code example
This code example loops trough the records in the grid and shows wheter or not they are selected.
Sub SelectieTest
dim activegrid
dim inttel
dim geselecteerd
if pdc.Windows.ActiveWindow.WindowKey = "PB" then
set activegrid = pdc.Windows.ActiveWindow.Datagrids.GetGridByName("PDCGrid1", "PR_POS")
if IsValid(activegrid) then
activegrid.FirstRecord
do while not activegrid.EoF
geselecteerd = false
for inttel= 0 to activegrid.selectedValues.Count -1
if activegrid.SelectedValues.Item(inttel) = activegrid.GetField(activegrid.SelectionKey) then
geselecteerd = true
exit for
end if
Next
if geselecteerd then
msgbox "Regel " & activegrid.GetField("PR_POS") & " is geselecteerd."
else
msgbox "Regel " & activegrid.GetField("PR_POS") & " is niet geselecteerd."
end if
activegrid.NextRecord
loop
end if
set activegrid = nothing
end if
End Sub
Availability
Available since April 2010 (from version 4.1)