禁用GridView中的用户 [英] disabling users in gridview

查看:68
本文介绍了禁用GridView中的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在gridview中有一个启用删除按钮.并且我们有一个网格veiw的行删除事件来编写用于删除功能的代码...

我有一个用户列表.并希望在gridveiw中显示它们,并删除功能.我也想在gridview中放置一个链接按钮.并希望使用该链接按钮实现禁用用户..

我想知道我必须调用哪个网格视图事件才能通过linkbutton实现禁用功能.

我正在使用0和1来启用禁用和启用功能..

we have a enable delete button in gridview. and we have a row deleting event of a grid veiw to write the coding for delete functionality...

i have a list of users. and waant to show them in gridveiw and in addition to delete functinality . i also want to put a link button in gridview. and want to implement a disable user using that link button..

i want to know which event of grid view i have to invoke to implement disable functionality through linkbutton.

i am using bits using 0 and 1 to enable disable and enable fucntionality..

推荐答案

您可以使用Grid_RowCommand事件,从中可以获取row_Index属性在EventArgs的"e"参数中,如果需要,您还可以设置命令参数属性,这将帮助您识别rowId.在Object source参数中,您将获得命令按钮,该按钮可以在事件完成后禁用.
You can use Grid_RowCommand Event, where you will be able to get the row_Index property in EventArgs ''e'' parameter, If required you can also set command argument property, which will help you to identify the rowId. in the Object source parameter you will get the commanding button which you can disable after completion of event.


这篇关于禁用GridView中的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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