如何使用javascript获取gridview中当前行的neweditindex [英] How to get the neweditindex of the current row in gridview using javascript

查看:70
本文介绍了如何使用javascript获取gridview中当前行的neweditindex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




在我的网页中,我使用的是gridview,其中包含下一个页面索引的上一个按钮。每行都有编辑,删除按钮。我想当我点击编辑按钮时,那个时候下一个按钮就不行了。

但是当我编辑行时,下一个按钮也正常工作,所以下一页的相应行会被改变编辑行。为此我想限制使用javascript。我们可以使用javascript找到当前行的neweditindex来限制此问题吗?如果有可能,请帮助我....

Hi
In my webpage I m using gridview which has next, previous button for page index. Each row has Edit, delete button. I want When I click the edit button, that time the next button won''t worked.
But When i editing rows the next button is also working, So next page has that corresponding row will be changed to edited rows. For this I want to restrict using javascript. Can we find the neweditindex of the current row using javascript for restrict this issue? If it is possible, Please help me....

推荐答案

而不是禁用下一个按钮

使用
Rather than disabling next button
Use
gridview1.editindex = -1

在你的pageindexchanging事件中。



你可以在OnRowEditing事件中禁用按钮&在rowupdated&中启用它rowcancellingedit event。

in your pageindexchanging event.
or
in you can disable button in OnRowEditing event & enable it in rowupdated & rowcancellingedit event.


这篇关于如何使用javascript获取gridview中当前行的neweditindex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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