关于Anthem中的GridView事件RowCreated和RowDatabound
2006-07-20 17:32
369 查看
一个问题:
当某一行出于编辑状态时候,对某个值修改,这时候如果在RowCreated事件中访问了某控件,如
TextBox txt = (System.Web.UI.WebControls.TextBox)e.Row.FindControl("txtPoint");
那么在接下来的RowUpdating事件中,你会发现你所修改的值已经丢失,不知道原因,难道这里的访问会导致丢失Viewstate?解决办法是在RowDataBound中访问,而不在RowCreated中访问。
当某一行出于编辑状态时候,对某个值修改,这时候如果在RowCreated事件中访问了某控件,如
TextBox txt = (System.Web.UI.WebControls.TextBox)e.Row.FindControl("txtPoint");
那么在接下来的RowUpdating事件中,你会发现你所修改的值已经丢失,不知道原因,难道这里的访问会导致丢失Viewstate?解决办法是在RowDataBound中访问,而不在RowCreated中访问。
相关文章推荐
- GridView的RowCreated与RowDataBound事件
- GridView的RowCreated与RowDataBound事件区别
- GridView的RowCreated与RowDataBound事件区别
- GridView的RowCreated与RowDataBound事件区别
- winform中datagridview事件RowPrePaint中类似与webform中的gridview的rowdatabound事件
- GridView控件RowCreated事件的操作——鼠标动作
- gridview-----添加OnRowDeleting事件及确认事件OnRowCreated
- 关于ASPxGridView控件触发服务器端FocusedRowChanged事件的设置
- 关于GridView中rowdatabound事件和rowediting事件的合用问题
- 关于GridView RowUpdating事件中处理一些前台特殊控件,例如 下拉框DropDownList 等等
- 关于Gridview激发了未处理的事件“RowDeleting”错误的处理
- 关于Gridview表格中的按钮事件
- GridViewRow可以任意位置单击引发事件的方法
- GridView.RowCommand 事件
- GridView 中点击更改不能触发RowUpdating事件的解决方法
- GridView控件RowDataBound事件中获取列字段
- GridViewRow可以任意位置单击引发事件的方法!
- [GridView]在 RowCommand事件中,自订的Button 如何取出某一列的索引值(RowIndex)
- GridView的RowDataBound事件 获取当前行的某个数据列
- GridView RowCommand事件操作Demo Code