回发上的gridview数据丢失问题 [英] gridview data lossing problem on postback

查看:74
本文介绍了回发上的gridview数据丢失问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一些搜索按钮上绑定一个网格....绑定后我输入一些新的值

到网格单元格....之后单击保存按钮... .unable获取单元格数据..给null ....

i am binding a grid on some search button....after binding am entering some new values
to cells of grid....after that while clicking on the save button....unable to get the cells data..its giving null....

推荐答案

到网格单元格....之后点击保存按钮....无法获取单元格数据

如果不在 Page.IsPostback <中包装datagrid绑定代码,最常见的方法来解决问题/ code> property。您可能在页面加载中再次重新加载和绑定网格数据,导致数据丢失。
to cells of grid....after that while clicking on the save button....unable to get the cells data
Most common way to face the issue if by not wrapping the datagrid bind code within Page.IsPostback property. You might be reloading and binding the grid data again in the page load, leading to loss of data.


这篇关于回发上的gridview数据丢失问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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