| 首页 | 新闻 | 网页 | 设计 | 色彩 | 原创 | 视觉 | 素材 | 动漫 | 酷站 | 策划 | 文案 | 访谈 | 运营 | 编程 | 数据库 | 服务器 | 下载 | 图库 | 
您的位置: 幽幽天空 > 网页 > 编程开发 > VB教程 > 文章正文 用户登录
如何加入透明Flas
为新浪博客添加fl
HiShop网店系统一
flashget下载联盟
265联盟:“Flash
HKflash提供免费个
Sharea免费3G媒体
FLASH调用XML数据
Flash Remoting -
Flash Com

MSHFlexGrid 控件的应用           

MSHFlexGrid 控件的应用

作者:佚名 来源:CSDN 作者: virtualboy 更新:2006-8-25 21:05:35 错误报告 我要投稿

应用心得                                  

1)mshflexgrid控件 与 msflexgrid控件 的异同

 mshflexgrid控件与adodc控件绑定,msflexgrid控件与data控件绑定。

2)mshflexgrid控件的应用

如果记录集已经在程序中产生,则可以不与adodc控件绑定,直接在mshflexgrid控件中显示数据,并且可以根据需要设置控件中行的颜色,如下例:   

public function datagrid_update() as boolean
    on error goto datagrid_update_err
    dim orarsrecordset as object
    dim adorsrecordset as new adodb.recordset
    dim lngdatediff as long
   
    call getdata(const_generaltable_timeout_info, orarsrecordset)
    if not ado_databaseopen(dskattr, 1) then
        datagrid_update = false
        exit function
    end if

    adorsrecordset.cursorlocation = aduseclient
    call adorsrecordset.open(const_vehicletable_recordset_queried, _
                            mobjdatasource.connectionstring, , , adcmdtext)
    frmshownewdata.grdsaishin.colwidth(0) = 800
    frmshownewdata.grdsaishin.colwidth(1) = 2000
    frmshownewdata.grdsaishin.allowuserresizing = flexresizecolumns
    set frmshownewdata.grdsaishin.recordset= adorsrecordset
   
    dim intCnt as integer
    intCnt = 0
    intCnt = intCnt + 1
    while not adorsrecordset.eof
        lngdatediff = datediff("n", adorsrecordset.fields("測位日時"), now)
        if lngdatediff > orarsrecordset.fields("gen_v_num").value then
            frmshownewdata.grdsaishin.row = intCnt
            dim j as integer
            for j = 0 to frmshownewdata.grdsaishin.cols - 1
                frmshownewdata.grdsaishin.col = j
                frmshownewdata.grdsaishin.cellbackcolor = &h80ffff
            next
        end if
        intCnt = intCnt + 1
        call adorsrecordset.movenext
    wend
    call ado_databaseclose
    datagrid_update = true
    exit function
datagrid_update_err:
    call ado_databaseclose
    datagrid_update = false
end function



文章录入:skyuu    责任编辑:skyuu 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    发表评论:
    姓名:  评 分: 1分 2分 3分 4分 5分
     
  • 严禁发表危害国家安全、政治、黄色淫秽等内容的评论。
  • 用户需对自己在使用幽幽天空服务过程中的行为承担法律责任。
  • 本站管理员有权保留或删除评论内容。
  • 评论内容只代表机友个人观点,与本网站立场无关。