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" =
riginal_ROTATION'>
<UpdateParameters>
<asp
arameter Name="STATUS1" Type="String" />
<asp
arameter Name="STATUS2" Type="String" />
<asp
arameter 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>
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" =
<UpdateParameters>
<asp
<asp
<asp
</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>