造梦西游boss大全图片:vb中如何让数据在datagrid中显示

来源:百度文库 编辑:高校问答 时间:2024/04/28 16:37:21
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