在gridview中冻结列 [英] Freezing columns in a gridview
问题描述
我正在尝试使用Visual Basic以编程方式冻结ASP.Net gridview控件中的列。
我的代码取自msdn知识库:< br $> b $ b
https://msdn.microsoft.com/en-us/library/28e9w2e1(v=vs.90).aspx
代码为:
mydatagridview.columns(manufacturer)。frozen = true
gridview已经绑定了一个数据,该数据是从数据字段制造商自动生成的。
但是,我收到错误消息:
'Frozen'不是'System.Web.UI.WebControls.DataControlField'的成员。
有人能指出我正确的方向纠正这个问题吗?
我想我可以在这里回答我自己的问题 - datagridview是一个Windows窗体控件,而不是一个GridView。卫生署!深夜编码过多。
查看此CP帖子的解决方案 - 冻结Asp.net GridView HaderRow&某些列 [ ^ ]
I'm trying to programmatically freeze columns in an ASP.Net gridview control with Visual Basic.
My code is taken from the msdn knowledge base at:
https://msdn.microsoft.com/en-us/library/28e9w2e1(v=vs.90).aspx
The code is:
mydatagridview.columns("manufacturer").frozen = true
The gridview has been bound with a data which is automatically generated from a data field "manufacturer".
However, I get the error message:
'Frozen' is not a member of 'System.Web.UI.WebControls.DataControlField'.
Can anyone point me in the right direction to correct this?
I think I can answer my own question here - the datagridview is a windows form control, not a GridView. Doh! Too much late night coding.
See the solutions to this CP post - Freeze Asp.net GridView HaderRow & Some Columns[^]
这篇关于在gridview中冻结列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!