数据网格中的下拉列 [英] Dropdown column in a datagrid

查看:57
本文介绍了数据网格中的下拉列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含下拉列的数据网格。一切正常,直到我进入编辑模式,似乎忘记了所选行中列的原始值。如何在编辑模式下保留该值?????

解决方案

您是在Page Load事件....还是在任何函数中执行DataBind在asp生命周期中发生事件代码之前执行?


如果你是,那么你的数据将重新绑定到GridView,任何编辑过的东西都将丢失。

我想我已经接近了。我在互联网上找到了一个在源代码中使用EVAL的程序。问题是我收到错误信息。请参阅随附的代码。


请发布您的代码而不是使用附件。

附件目前无效。


此外,请发布您收到的错误消息....说明发生错误不会帮助我们理解您遇到的问题。


I have a datagrid that has a dropdown column. All works fine until I go to edit mode and it seems to forget the original value of the column in the selected row. How can I retain that value in edit mode?????

解决方案

Are you preforming a DataBind in the Page Load event....or in any function that is executed before the Event code occurs in the asp life cycle?

If you are, then your data is being re-bound to the GridView and anything edited will be lost.


I think I''m getting close. I''ve found on the internet a procedure that uses the EVAL in the source. The problem is I get an error msg. Please see the attached code.


Please post your code instead of using attachments.
Attachments are not working at this time.

Also, please post the error message that you are getting....stating that an error occurs is not going to help us in understanding the problem that you''re having.


这篇关于数据网格中的下拉列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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