02-28-2007, 02:30 PM
how do i set column width and height for the datagrid ?
![[Image: 2007-02-28_143357.jpg]](http://www.microbender.com/pic/2007-02-28_143357.jpg)
here is my current code:
msdatagrid_dialog
second question:
how to fill a datalist with custom values (not recordset) ?
do you recommend another component (code will be compiled as exe).
thanks.
![[Image: 2007-02-28_143357.jpg]](http://www.microbender.com/pic/2007-02-28_143357.jpg)
here is my current code:
msdatagrid_dialog
\Dialog_Editor
function# hDlg message wParam lParam
;typelib MSDataListLib {F0D2F211-CCB0-11D0-A316-00AA00688B10} 1.0
;typelib MSFlexGridLib {5E9E78A0-531B-11CF-91F6-C2863C385E30} 1.0
typelib MSDataGridLib {CDE57A40-8B86-11D0-B3C6-00A0C90AEA82} 1.0
if(hDlg) goto messages
if(!ShowDialog("msdatagrid_dialog" &msdatagrid_dialog)) ret
;BEGIN DIALOG
;0 "" 0x10CF0A44 0x100 0 0 421 313 "datagrid"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;4 ActiveX 0x54000000 0x0 12 4 248 101 "MSDataGridLib.DataGrid"
;END DIALOG
;DIALOG EDITOR: "" 0x2020002 "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,Database db4.Open(db4.CsAccess("C:\Programme\Microsoft Visual Studio\MyProjects\vbFlexdata-example\mydatabase2.mdb"))
,ADO.Recordset rs4; ARRAY(str) a4
,db4.QueryRs("SELECT * FROM friends" rs4)
,db4.RsGetAll(rs4 a4)
,
,MSDataGridLib.DataGrid da4._getcontrol(id(4 hDlg))
,da4.AllowUpdate="True"
,da4.DataSource=+rs4
,DT_Init(hDlg lParam)
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,;case WM_DROPFILES mes _s
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
,,
,,
ret 1
second question:
how to fill a datalist with custom values (not recordset) ?
do you recommend another component (code will be compiled as exe).
thanks.