N
Newbie
Having seen in the past lots of questions re: the datagrid control and not
being able to find any answers I thought I would share what I have been able
to do:
To set the datasource for the datagrid use the following:
(having already created a recordset - rs)
Set me.mydatagrid.DataSource = rs
To format the Grid from code (assuming 2 columns in the recordset)
Dim col1, col2 as column
set col1 = me.mydatagrid.columns(0)
set col2 = me.mydatagrid.columns(1)
me.mydatagrid.font.name = "Arial"
me.mydatagrid.font.size = 10
me.mydatagrid.headfont.name = "Arial"
me.mydatagrid.headfont.bold = true
col1.width = 2000
col2.width = 1000
col1.caption = "My Column"
col2.caption = "Your Column"
HTH
being able to find any answers I thought I would share what I have been able
to do:
To set the datasource for the datagrid use the following:
(having already created a recordset - rs)
Set me.mydatagrid.DataSource = rs
To format the Grid from code (assuming 2 columns in the recordset)
Dim col1, col2 as column
set col1 = me.mydatagrid.columns(0)
set col2 = me.mydatagrid.columns(1)
me.mydatagrid.font.name = "Arial"
me.mydatagrid.font.size = 10
me.mydatagrid.headfont.name = "Arial"
me.mydatagrid.headfont.bold = true
col1.width = 2000
col2.width = 1000
col1.caption = "My Column"
col2.caption = "Your Column"
HTH