Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

updating a gridview using stored procedure

$
0
0

So I have successfully configured my gridview using a stored procedure supplied to me by my dbadmin.

Now he sent a different stored procedure for updating using parameters different from the ones I used in my gridview.

Needless to say, when I try to update, the application throws an error "cannot find the fieldname"

Is there a way around this? Thank you for the help

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SPdbColumnsList" ><AlternatingRowStyle BackColor="#F3F6F5" /><Columns><asp:BoundField DataField="ClmnKy" HeaderText="ID" SortExpression="ClmnKy" ReadOnly="True" Visible="true" /><asp:BoundField DataField="cITNts" HeaderText="IT's Notes" SortExpression="cITNts" ReadOnly="True" /><asp:TemplateField HeaderText="Users' Notes" SortExpression="cUserNts"><EditItemTemplate><asp:TextBox ID="editIDTextbox" TextMode="MultiLine" Wrap="true" Width="100%" Height="50px" runat="server" Text='<%#  Bind("cUserNts")  %>'></asp:TextBox></EditItemTemplate><ItemTemplate><asp:TextBox ID="editIDLabel" BackColor="Transparent" BorderStyle="None" Width="100%" Height="50px" TextMode="MultiLine" ReadOnly="true" runat="server" Text='<%#  Bind("cUserNts")  %>'></asp:TextBox></ItemTemplate></asp:TemplateField><asp:CommandField ShowEditButton="True" ButtonType="Button" /></Columns><FooterStyle BackColor="#999966" /><HeaderStyle BackColor="#679540" /></asp:GridView><asp:SqlDataSource ID="SPdbColumnsList" runat="server" ConnectionString="<%$ ConnectionStrings:DataDictionaryConnectionString %>" SelectCommand="dbColumnsList" SelectCommandType="StoredProcedure" UpdateCommand="UpdateNotes" UpdateCommandType="StoredProcedure"><SelectParameters><asp:ControlParameter ControlID="lbltable" PropertyName="Text" Name="TableNmIn"></asp:ControlParameter></SelectParameters><UpdateParameters><asp:Parameter Name="TableNmIn" Type="String"></asp:Parameter>--%><asp:Parameter Name="KeyIn" Type="Int32" DefaultValue="2819"></asp:Parameter>--%><asp:Parameter Name="NotesIn" Type="String" DefaultValue="test"></asp:Parameter></UpdateParameters>


Viewing all articles
Browse latest Browse all 5678

Trending Articles