您的位置:程序门 -> vb -> 基础类



请教vsflexgrid绑定数据源的怎么固定前边2两列在横向移动滚动条时固定显示?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


请教vsflexgrid绑定数据源的怎么固定前边2两列在横向移动滚动条时固定显示?[已结贴,结贴人:newqger]
发表于:2007-02-03 14:13:14 楼主
如题:
请教vsflexgrid绑定数据源的怎么固定前边2两列在横向移动滚动条时固定显示?
谢谢.
请注意时绑定数据的.
不绑定的可以设的(自己add进去的)
先设置了固定列后再绑定数据源,记录集的字段从非绑定的那列开始显示.
发表于:2007-02-03 15:10:091楼 得分:0
up   up     up   ,help   me....thanks.
发表于:2007-02-03 15:37:082楼 得分:0
vs?不是ms?
发表于:2007-02-05 10:17:043楼 得分:0
是   vsflexgrid   的
发表于:2007-02-06 09:59:424楼 得分:0
老大们,还没放假吧。帮俺一下。谢谢。
发表于:2007-02-06 10:09:315楼 得分:0
顺便再问:masked   edit   怎么没有alignment属性,晕啊。
发表于:2007-02-06 10:38:136楼 得分:10
fg.fixedcols   =   2
这个?
发表于:2007-02-06 10:42:187楼 得分:10
先设置了固定列后再绑定数据源,记录集的字段从非绑定的那列开始显示.
----------
倒过来应该就可以了,就是线定数据源后,加上fg.fixedcols   =   2
发表于:2007-02-06 10:43:138楼 得分:0
回楼上:固定列是那样,但是先固定了前2列后再set   fg.datasource   =   adorecordset   的话前边固定的2列不显示内容顺序地向后显示记录集信息了。
发表于:2007-02-06 10:43:409楼 得分:0
倒过来不允许啊。
发表于:2007-02-06 10:49:2410楼 得分:0
倒过来不允许啊。
--------
set   fg.datasource   =   rs
set   rs   =   nothing
fg.fixedcols   =   2
我试过了,可以的呀
发表于:2007-02-06 11:04:0111楼 得分:0
fg.fixedcols   =   2
fixedcols   property

returns   or   sets   the   number   of   fixed   (non-scrollable)   columns.

syntax

[form!]vsflexgrid.fixedcols[   =   value   as   long   ]

remarks

fixed   columns   remain   visible   when   the   user   scrolls   the   contents   of   the   grid.   they   are   not   selectable   or   editable   by   the   user   (but   you   can   select   them   with   code   and   even   allow   the   user   to   edit   their   contents   by   selecting   them   and   invoking   the   editcell   method).   you   can   set   fixedcols   to   any   value   between   zero   and   the   total   number   of   columns.

the   following   line   of   code   places   3   fixed   columns   at   the   left   edge   of   the   grid.

      fg.fixedcols   =   3

fixed   columns   are   typically   used   in   spreadsheet   applications   to   display   row   numbers   or   other   types   of   labels.  

to   format   the   fixed   cells,   use   the   backcolorfixed,   forecolorfixed,   gridlinesfixed,   and   fixedalignment   properties.

you   can   create   non-scrollable   columns   that   can   be   selected   and   edited   using   the   frozencols   property.

if   the   allowuserresizing   property   is   set   to   a   non-zero   value,   the   fixed   cells   allow   the   user   to   resize   row   heights   and   column   widths   at   run   time.

发表于:2007-02-06 11:29:1512楼 得分:0
哦,set   rs   =   nothing
fg.fixedcols   =   2   这样可以啊。但我的rs是不能释放的。虽然不是连到数据库的但是我要更新等处理。
谢谢老大。
同时谢楼上,我英语4级30分的水平。简单的地方能明白。


快速检索

最新资讯
热门点击