在GridView中更新 [英] updating in gridview
本文介绍了在GridView中更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我通过gridview更新数据表时,它显示错误:"GridView''Gridview1''触发了未处理的事件RowUpdating".
解决方案
将aspx中的OnRowUpdating()事件简单地添加为:
< asp:gridview id =" id gvVehicle" gvVehicle" span> runat =" 服务器" 自动生成列 错误" cellpadding =" xmlns:asp =" > 宽度="99%" ForeColor =#333333" GridLines ="None" CssClass ="allgrids" OnRowCommand ="gvVehicle_RowCommand" OnRowUpdating ="gvVehicle_RowUpdating" ..... < /asp:gridview 受保护的 无效 gvVehicle_RowUpdating(对象发件人,GridViewUpdateEventArgs e) { }
这将解决您的错误
,同时从文本框中的gridview值中获取值为null,这样我就无法更新数据表....此问题的解决方案是什么? /blockquote>
When i''m updating the datatable via gridview it shows the error: "The GridView ''Gridview1'' fired event RowUpdating which was not handled".
How can i come out of this error?解决方案simple add OnRowUpdating() event in aspx as :
<asp:gridview id="gvVehicle" runat="server" autogeneratecolumns="False" cellpadding="4" xmlns:asp="#unknown"> Width="99%" ForeColor="#333333" GridLines="None" CssClass="allgrids" OnRowCommand="gvVehicle_RowCommand" OnRowUpdating="gvVehicle_RowUpdating".....</asp:gridview>
and in aspx.cs add:
protected void gvVehicle_RowUpdating(object sender, GridViewUpdateEventArgs e) { }
this will solve your error
while taking value from gridview value in the textbox is null so that i can''t update the datatable.... what is the solution for this problem?
这篇关于在GridView中更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文