通过数据库更新gridview中的值 [英] update values in gridview through database

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

问题描述

我在aspx页面中有gridview.我想做rowupdating事件,但它显示
出现以下错误
TemplateField不支持回调,因为某些控件无法在回调中正确更新.

I have gridview in my aspx page.I want to do rowupdating event but it shows
following error
Callbacks are not supported on TemplateField because some controls cannot update properly in a callback. Turn callbacks off on ''GridView1''.

推荐答案

^ ]和链接2 [
Link1[^]and Link2[^] might help you to solve your problem.


尝试 ^ ]:
1.将Gridview数据绑定置于!IsPostback条件. 2.将gridview的Viewstate设置为false


如果仍然无法解决,请看一下类似的讨论: http://www.dotnetspider.com /forum/162893-Gridview-problem.aspx [ ^ ]

它说:如果Columns集合包含不支持回调的列(例如TemplateField),则会引发NotSupportedException异常.

知识库在这里: GridView.EnableSortingAndPagingCallbacks属性 [ ^ ]
Try couple of things[^]:
1. Put the Gridview data binding in !IsPostback condition.
2. Set Viewstate as false for the gridview


If this does not resolve then, have a look at this similar discussion: http://www.dotnetspider.com/forum/162893-Gridview-problem.aspx[^]

It says: If the Columns collection contains a column that does not support callbacks, such as TemplateField, a NotSupportedException exception is raised.

Knowledgebase is here: GridView.EnableSortingAndPagingCallbacks Property [^]


这篇关于通过数据库更新gridview中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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