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

NewQger 2007-02-03 02:13:14
如题:
请教VSflexgrid绑定数据源的怎么固定前边2两列在横向移动滚动条时固定显示?
谢谢.
请注意时绑定数据的.
不绑定的可以设的(自己add进去的)
先设置了固定列后再绑定数据源,记录集的字段从非绑定的那列开始显示.
...全文
359 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
NewQger 2007-02-06
  • 打赏
  • 举报
回复
哦,Set rs = Nothing
fg.FixedCols = 2 这样可以啊。但我的rs是不能释放的。虽然不是连到数据库的但是我要更新等处理。
谢谢老大。
同时谢楼上,我英语4级30分的水平。简单的地方能明白。
guyehanxinlei 2007-02-06
  • 打赏
  • 举报
回复
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.

vbman2003 2007-02-06
  • 打赏
  • 举报
回复
倒过来不允许啊。
--------
Set fg.DataSource = rs
Set rs = Nothing
fg.FixedCols = 2
我试过了,可以的呀
NewQger 2007-02-06
  • 打赏
  • 举报
回复
倒过来不允许啊。
NewQger 2007-02-06
  • 打赏
  • 举报
回复
回楼上:固定列是那样,但是先固定了前2列后再set fg.datasource = adorecordset 的话前边固定的2列不显示内容顺序地向后显示记录集信息了。
vbman2003 2007-02-06
  • 打赏
  • 举报
回复
先设置了固定列后再绑定数据源,记录集的字段从非绑定的那列开始显示.
----------
倒过来应该就可以了,就是线定数据源后,加上fg.FixedCols = 2
vbman2003 2007-02-06
  • 打赏
  • 举报
回复
fg.FixedCols = 2
这个?
NewQger 2007-02-06
  • 打赏
  • 举报
回复
顺便再问:Masked Edit 怎么没有alignment属性,晕啊。
NewQger 2007-02-06
  • 打赏
  • 举报
回复
老大们,还没放假吧。帮俺一下。谢谢。
NewQger 2007-02-05
  • 打赏
  • 举报
回复
是 VSflexgrid 的
chuifengde 2007-02-03
  • 打赏
  • 举报
回复
VS?不是MS?
NewQger 2007-02-03
  • 打赏
  • 举报
回复
up up up ,help me....thanks.

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧