asp.net - Can you please tell me why I am getting `The GridView 'GridView1' fired event RowUpdating which wasn't handled.` error message -


i have been able work through initial problem of not being able insert records consistently new error message crops up.

now, getting the gridview 'gridview1' fired event rowupdating wasn't handled.

this error occurs when click update button update row of record.

first, click edit button. exposes update/cancel buttons.

when click update button, aforementioned error.

my first take gridview needed onrowupdating after adding (see markup code), still getting same error.

this bit frustrating.

here code.

protected sub gridview1_rowupdating(byval sender object, byval e gridviewupdateeventargs)     dim dd dropdownlist = directcast(gridview1.rows(e.rowindex).findcontrol("ddlstatus"), dropdownlist)     e.newvalues("status") = dd.selecteditem.text end sub 

markup:

    <asp:gridview id="gridview1" runat="server" datasourceid="sqldatasource1"          autogeneratecolumns="false" datakeynames="reqnum" allowpaging="true"          cellpadding="4" forecolor="#333333" gridlines="none" visible="true"          onrowdatabound="gvrowdatabound" onrowediting="gridview1_rowediting"         onrowupdating="gridview1_rowupdating"         enableviewstate="false" autogeneratedeletebutton="true"          autogenerateeditbutton="true">         <rowstyle backcolor="#f7f6f3" forecolor="#333333" />       <columns>         <asp:boundfield datafield="rownum" headertext="rownum" insertvisible="false" readonly="true"             sortexpression="rownum" />         <asp:boundfield datafield="reqnum" headertext="reqnum" sortexpression="reqnum"  />         <asp:boundfield datafield="reqrecdate" headertext="reqrecdate" sortexpression="reqrecdate" />         <asp:boundfield datafield="reqrecfrom" headertext="reqrecfrom" sortexpression="reqrecfrom" />         <asp:boundfield datafield="skillsets" headertext="skillsets" sortexpression="skillsets" />        <asp:boundfield datafield="application" headertext="application" sortexpression="application" />         <asp:boundfield datafield="hoursperweek" headertext="hoursperweek" sortexpression="hoursperweek" />         <asp:boundfield datafield="fromdate" headertext="fromdate" sortexpression="fromdate" />         <asp:boundfield datafield="todate" headertext="todate" sortexpression="todate" />        <%-- <asp:boundfield datafield="status" headertext="status" sortexpression="status" />--%>         <asp:templatefield headertext="status">           <edititemtemplate>             <asp:dropdownlist id="ddlstatus" cssclass="dropdown" datasourceid="dsforddl" runat="server">                  <asp:listitem text="none" value=""></asp:listitem>                  <asp:listitem>not started</asp:listitem>                  <asp:listitem>pending</asp:listitem>                  <asp:listitem>completed</asp:listitem>             </asp:dropdownlist>           </edititemtemplate>           <itemtemplate>             <asp:label id="lblstatus" runat="server" text='<% #bind("status") %>'></asp:label>           </itemtemplate>         </asp:templatefield>         <asp:boundfield datafield="statusupdate" headertext="statusupdate" sortexpression="statusupdate" />         <asp:boundfield datafield="statusupby" headertext="statusupby" sortexpression="statusupby" />       </columns>         <footerstyle backcolor="#5d7b9d" font-bold="true" forecolor="white" />         <pagerstyle backcolor="#284775" forecolor="white" horizontalalign="center" />         <selectedrowstyle backcolor="#e2ded6" font-bold="true" forecolor="#333333" />         <headerstyle backcolor="#5d7b9d" font-bold="true" forecolor="white" />         <editrowstyle backcolor="#999999" />         <alternatingrowstyle backcolor="white" forecolor="#284775" />     </asp:gridview>       <asp:sqldatasource id="sqldatasource1" runat="server" connectionstring="<%$ connectionstrings:connectionstring %>"     selectcommand="select distinct [rownum],[reqnum], [reqrecdate], [reqrecfrom], [skillsets], [application], [hoursperweek], [fromdate], [todate], [status], [statusupdate], [statusupby] [term] order [reqnum]"  updatecommand="insert term(reum, reqrecdate, reqrecfrom, skillsets, application, hoursperweek, fromdate, todate, status, statusupby, statusupdate) values (@reum,@reqrecdatelbltxt, @reqrecfromlbltxt, @skillsets, @application, @hoursperweek,@fromdate,@todate, @status, @lognametxt, @logdatetxt)"      <deleteparameters>      <asp:parameter name="rownum" type="int32" />     </deleteparameters>     <updateparameters>         <asp:parameter name="reqnum" type="string" />         <asp:parameter dbtype="datetime" name="reqrecdate" />         <asp:parameter name="reqrecfrom" type="string" />         <asp:parameter name="skillsets" type="string" />         <asp:parameter name="application" type="string" />         <asp:parameter name="hoursperweek" type="int32" />         <asp:parameter dbtype="datetime" name="fromdate" />         <asp:parameter dbtype="datetime" name="todate" />         <asp:parameter name="status" type="string" />         <asp:parameter dbtype="datetime" name="statusupdate" />         <asp:parameter name="statusupby" type="string" />         <asp:parameter name="rownum" type="int32" />     </updateparameters>     </asp:sqldatasource> 

thanks lot in advance assistance.

the gridview tracks handlers ensure has been added deal update intentionally.

unless manually calling "addhandler" somewhwere else in code, don't see handles claus on event method intercept event being raised.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -