南京营业执照办理:vb中如何让数据在datagrid中显示

来源:百度文库 编辑:杭州交通信息网 时间:2024/06/06 19:37:07
vb中如何让数据的内容在datagrid中显示
希望能说的详细点.谢谢

' 二维数组
row = 0
for i=lbound(data, 1) to ubound(data, 1)
col = 0
for j=lbound(data, 2) to ubound(data, 2)
grid.textmetrix(start_row+row, start_col+col) = data(i, j)
col = col + 1
next
row = row + 1
next

' 记录集
row = start_row
while (not rst.eof)
col = start_col
for each f in rst.fields
grid.textmetrix(row, col) = f.value
col = col + 1
next
rst.movenext
row = row + 1
loop