具有编辑功能的ASP.NET gridview仅适用于已定义的登录名 [英] ASP.NET gridview with editing availble only for Defined logins

查看:52
本文介绍了具有编辑功能的ASP.NET gridview仅适用于已定义的登录名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,

我有一个 Gridvie w,它是在页面加载时加载的.它包括行编辑,更新,删除并向网格中添加新行.现在我希望网格仅显示某些定义的登录名的编辑功能它应该提供简单的网格,并且不能进行任何修改.

我该怎么办?.
我必须创建一个新表格吗?..

谢谢
授予

解决方案

尝试类似的方法.


if (LoggedInUser.HasRights())
{
    this.SimpleGridView.ShowFooter = false;
    this.SimpleGridView.AutoGenerateEditButton = false;
    this.SimpleGridView.AutoGenerateDeleteButton = false;
}



您可以只隐藏编辑列.
希望对您有所帮助.在ASP.NET中 [ ]


hey there,

I have a Gridview which is loaded on page load.It includes row editing,updating,deleting and adding new row to the grid.Now i want the grid to show editing features for some defined logins only otherwise it should provide with simple grid with no modifications possible.

How should i do that?.
Do i have to create a new form?..

Thanks
Amit

解决方案

Try something like this.


if (LoggedInUser.HasRights())
{
    this.SimpleGridView.ShowFooter = false;
    this.SimpleGridView.AutoGenerateEditButton = false;
    this.SimpleGridView.AutoGenerateDeleteButton = false;
}



You could just hide the edit column.
Hope this helps.


look at this detail view Login Control in ASP.NET []


这篇关于具有编辑功能的ASP.NET gridview仅适用于已定义的登录名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆