GridView列根据用户首选项隐藏 [英] GridView column hide according to user Preferences
本文介绍了GridView列根据用户首选项隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
任何人都可以帮助我。
我有一个包含6列的grdiview,我必须提供用户偏好根据他们的意愿来看/隐藏列。
任何人都可以建议我如何实现这个目标。
非常感谢
suman
解决方案
你应该管理用户ID或用户类别优先。然后根据用户ID或类别,你可以隐藏列
然后设置
AutoGenerateColumns = false
然后是行数据你应该写的约束事件
e.Row.Cells [index] .Visible = false ;
此链接对于完成此任务非常有帮助。
DataGridView列显示/隐藏弹出窗口 [ ^ ]
Hi All
Can anyone please help me.
I have a grdiview which has 6 columns and I have to give user preferences to see/hide the columns according to their wish.
Can anyone suggest me how I can achieve this.
Many Thanks
suman
解决方案
You should manage user ID or, User category first. Then according to the user ID or, Category you can hide the column
Then Set
AutoGenerateColumns="false"
Then on row data bound event you should write
e.Row.Cells[index].Visible = false;
This link is very helpful to achieve this task.
A DataGridView Column Show/Hide Popup[^]
这篇关于GridView列根据用户首选项隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文