updating a gridview

G

Guest

Hi,
I am trying to update my gridview using updatestatement..(vs.net 2005)
the data gets displayed and after changing it, when i clicked update,nothing
happens..it just stays the same..and no exception is thrown..
here is the code..

<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT
"COURSE1", "STATUS1", "COURSE2", "STATUS2", "ROTATION" FROM "ROTATIONCOURSES"'
updatecommand='UPDATE "ROTATIONCOURSES" SET "STATUS1" =
:STATUS1, "STATUS2" = :STATUS2 WHERE "ROTATION" = :eek:riginal_ROTATION'>
<UpdateParameters>
<asp:parameter Name="STATUS1" Type="String" />
<asp:parameter Name="STATUS2" Type="String" />
<asp:parameter Name="original_ROTATION" Type="Decimal" />
</UpdateParameters>
</asp:SqlDataSource>

<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="ROTATION" HeaderText="ROTATION"
ReadOnly="true" />
<asp:BoundField DataField="COURSE1" HeaderText="COURSE1"
SortExpression="COURSE1" readonly="true"/>
<asp:BoundField DataField="STATUS1" HeaderText="STATUS1"
SortExpression="STATUS1" />
<asp:BoundField DataField="COURSE2" HeaderText="COURSE2"
SortExpression="COURSE2" readonly="true"/>
<asp:BoundField DataField="STATUS2" HeaderText="STATUS2"
SortExpression="STATUS2" />
<asp:CommandField ShowEditButton="True" />
</Columns>
</asp:GridView>
<asp:Label ID="Label1" runat="server" Height="61px" Text="Label"
Width="207px"></asp:Label></div>
</form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top