Advertisement

03.12.2008 at 04:31AM PDT, ID: 23234669
[x]
Attachment Details

GridView Fired RowEditing without handler but EditItemTemplate is on the GridView

Asked by G0ggy in Programming for ASP.NET, Microsoft Visual Basic.Net, Visual Studio .NET 2005

Tags: ASP.NET VB.NET

Hi all,

I'm getting an error:

The GridView 'gvwClassList' fired event RowEditing which wasn't handled.

However, the attached code snippet is taken from ASP.NET 2.0 Unleashed and, I believe, used to work until recently. Can you see any holes in the code?

Thanks,Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
<asp:GridView ID="gvwClassList" DataKeyNames="classID" Width="95%" AutoGenerateColumns="false" AutoGenerateEditButton="true" SkinID="JCB" runat="server">
<Columns>
    <asp:TemplateField HeaderText="Status">
        <ItemTemplate>
            <%# Eval("dimControlText")%>
        </ItemTemplate>
        <EditItemTemplate>
            <asp:DropDownList ID="ddlClassStatus" DataSourceID="sdsDimensionValues" DataTextField="dimControlText" DataValueField="dimID" SelectedValue='<%# Bind("dimID") %>' runat="server"></asp:DropDownList>
        </EditItemTemplate>
    </asp:TemplateField>
    <asp:BoundField DataField="classID" Visible="false" />
    <asp:BoundField DataField="courseName" HeaderText="Course Name" />
    <asp:BoundField DataField="startDate" HeaderText="From" DataFormatString="{0:d}" HtmlEncode="false" />
    <asp:BoundField DataField="endDate" HeaderText="To" DataFormatString="{0:d}" HtmlEncode="false" />
    <asp:BoundField DataField="instructorsName" HeaderText="Instructor" />
</Columns>
</asp:GridView>
 
<asp:SqlDataSource ID="sdsDimensionValues" ConnectionString="<%$ ConnectionStrings:dev %>" 
    SelectCommand="Select dimID, dimControlText From dbo.sys_dimValues Where dimCat = 'STATUS'" runat="server">
</asp:SqlDataSource>
[+][-]03.12.2008 at 05:01AM PDT, ID: 21104922

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, Microsoft Visual Basic.Net, Visual Studio .NET 2005
Tags: ASP.NET VB.NET
Sign Up Now!
Solution Provided By: renjurdevan
Participating Experts: 1
Solution Grade: B
 
 
[+][-]03.12.2008 at 05:17AM PDT, ID: 21105051

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 09:46AM PDT, ID: 21143888

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 01:53AM PDT, ID: 21727279

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628