GeorgeDurkee
Programmer
I am using a data grid to contain a subset of data from an adodc recordset using the Parent/Child relationship to populate the datagrid.
Here is the sql statement that populates the recordset:
strsql = SHAPE {select PROJTITLE,PROCONTTYPE,PROJBILLMOC,PROJBILLRC,PROSTARTDATE,PROJKEY from PROJECTS where datepart('YYYY',[prostartdate]) = 2003 Order by PROJTITLE} AS ParentCMD APPEND ({select staffname as Employee,fk_staffkey,fkprojkey from PROJECTEFFORT,staff where fk_staffkey=staffkey Order by Staffname Asc} AS ChildCMD RELATE PROJKEY TO FKPROJKEY) AS ChildCMD
Here are the commands to populate the recordset and then the datagrid:
datPrimaryRS.RecordSource = strsql
datPrimaryRS.Refresh
Set grdDataGrid.DataSource = datPrimaryRS.Recordset("ChildCMD".UnderlyingValue
How can I determine how many rows are in the resultant datagrid so I can loop through the rows to generate a total for each of the 12 columns in the grid or do batch updates back to the database when the user leaves that parent record?
Thanks
Here is the sql statement that populates the recordset:
strsql = SHAPE {select PROJTITLE,PROCONTTYPE,PROJBILLMOC,PROJBILLRC,PROSTARTDATE,PROJKEY from PROJECTS where datepart('YYYY',[prostartdate]) = 2003 Order by PROJTITLE} AS ParentCMD APPEND ({select staffname as Employee,fk_staffkey,fkprojkey from PROJECTEFFORT,staff where fk_staffkey=staffkey Order by Staffname Asc} AS ChildCMD RELATE PROJKEY TO FKPROJKEY) AS ChildCMD
Here are the commands to populate the recordset and then the datagrid:
datPrimaryRS.RecordSource = strsql
datPrimaryRS.Refresh
Set grdDataGrid.DataSource = datPrimaryRS.Recordset("ChildCMD".UnderlyingValue
How can I determine how many rows are in the resultant datagrid so I can loop through the rows to generate a total for each of the 12 columns in the grid or do batch updates back to the database when the user leaves that parent record?
Thanks