在GridView的跟踪更改 [英] Track changes in Gridview

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

问题描述

有没有什么办法来跟踪这行的GridView被修改?我使用加载像一个excel表是从表中取出的GridView,我想设置modfied ==Ÿ一个标志,当线被用户修改。任何想法如何处理这个问题。

Is there any way to track which lines in Gridview are modified? I load gridview used like a excel sheet that is fetched from a table, I want to set a flag modfied == Y when the line is modified by a User. Any idea how to approach this problem.

感谢您提前:)

推荐答案

如果你不想去与第三方控制,你可以在你的GridView使用HiddenFields。你要跟踪的每个字段创建一个,当你回到保存更改,请检查是否在字段中的值不匹配相应hiddenfield的价值。

If you don't want to go with a 3rd party control, you could use HiddenFields in your gridview. Create one for each field you want to keep track of, and when you go back to save changes, check if the value in the field does not match the value in the corresponding hiddenfield.

工程就像一个魅力,如果你只得到你需要跟踪的几个领域;然而,它变得有点麻烦,如果你有25场要监视。

Works like a charm if you've only got a few fields you need to keep track of; however it gets a bit cumbersome if you've got 25 fields you want to monitor.

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

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