I'm fairly new to the AjaxControl Toolkit, so please bear with me if this is something simple. I am using the latest release of the control toolkit. On my page I have a ReorderList inside of an UpdatePanel that is populated via a a Select from a GridView/TableAdapter. The ReorderList populates just fine, but the problem comes when I try to Reorder the list. The list items snap back to the original position. If I set the PostBackOnReorder="True" I get no error message. Setting it to False sends me back a message saying "Reorder Failed, See Below -- Failed to Reorder." The UpdateMethod of the DataSource calls the TableAdapter to update the order of the items in the Database. I sort of followed this tutorial :http://aspalliance.com/1002_Video_Using_ATLAS_ReOrderList_Control_with_ObjectDataSource_Control for that part except that i used a Table Adapter rather than a Datalayer.
Now my question is this a problem with my SQL call? or is it a problem with the ReorderList control not functioning properly? I've also tried to put the Update commands in the OnItemReorder command but it never seems to fire. I've been looking at this for a day or so and its driving me nuts. Any help would be greatly appreciated. I'll include my code below.
1 "Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
2
3 Task Detail
4
5 "DetailHeader" runat="server" CssClass="title" >
6 "DetailsView1" runat="server" CssClass="boundTitle" AutoGenerateRows="False" DataSourceID="ObjectDataSource1" DataKeyNames="TA_ID">
7
8 "Title" HeaderText="Title" ShowHeader="False" SortExpression="Title">
9 "boundTitle" />
10 "datagridField" />
11
12
13
14 "ObjectDataSource1" runat="server" DeleteMethod="Delete"
15 InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByID"
16 TypeName="TaskDSTableAdapters.dt_Task_AnalysisTableAdapter" UpdateMethod="Update">
17
18 "Original_TA_ID" Type="Int32" />
19
20
21 "Title" Type="String" />
22 "Description" Type="String" />
23 "Original_TA_ID" Type="Int32" />
24
25
26 "TA_ID" QueryStringField="TA_ID" Type="Int32" />
27
28
29 "Title" Type="String" />
30 "Description" Type="String" />
31
32
33
34
35
36
37 "DetailPanel" runat="server" CssClass="basicPanel">
38 "GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="TPO_ID" CssClass="dataGrid" AllowPaging="True" DataSourceID="ObjectDataSource2">
39
40 "TPO_Description" HeaderText="Terminal Proficiency Objective" SortExpression="TPO_Description">
41 "datagridField" />
42 "datagridHeader" />
43
44 "True" ShowSelectButton="True">
45 "datagridHeader" />
46 "datagridField" />
47
48
49 "datagridRow" />
50 "datagridAlt" />
51 "datagridSelected" />
52
53 "ObjectDataSource2" runat="server" DeleteMethod="Delete"
54 InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByTAID"
55 TypeName="TaskDSTableAdapters.dt_TPOTableAdapter" UpdateMethod="Update">
56
57 "Original_TPO_ID" Type="Int32" />
58
59
60 "TPO_Description" Type="String" />
61 "TA_ID" Type="Int32" />
62 "Original_TPO_ID" Type="Int32" />
63
64
65 "TA_ID" QueryStringField="TA_ID" Type="Int32" />
66
67
68 "TPO_Description" Type="String" />
69 "TA_ID" Type="Int32" />
70
71
72
73
74
75
76 "SPOList" runat="server">
77
78 "GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="SPO_ID" DataSourceID="ObjectDataSource3" CssClass="dataGrid">
79
80 "SPO_Description" HeaderText="Supporting Proficiency Objective" SortExpression="SPO_Description">
81 "datagridField" />
82 "datagridHeader" />
83
84 "SPO_Seq_ID" HeaderText="Sequence Number" SortExpression="SPO_Seq_ID">
85 "datagridField" />
86 "datagridHeader" />
87
88 "True" >
89 "datagridHeader" />
90 "datagridField" />
91
92
93
94 Supporting Proficiency Objectives - Please Select a TPO to view
95
96 "datagridEmpty" />
97 "datagridRow" />
98 "datagridAlt" />
99 "datagridSelected" />
100
101 "ObjectDataSource3" runat="server" DeleteMethod="Delete"
102 InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByTPOID"
103 TypeName="TaskDSTableAdapters.dt_SPOTableAdapter" UpdateMethod="Update">
104
105 "Original_SPO_ID" Type="Int32" />
106
107
108 "TPO_ID" Type="Int32" />
109 "SPO_Seq_ID" Type="Int32" />
110 "SPO_Description" Type="String" />
111 "Original_SPO_ID" Type="Int32" />
112
113
114 "GridView1" Name="TPO_ID" PropertyName="SelectedValue"
115 Type="Int32" />
116
117
118 "TPO_ID" Type="Int32" />
119 "SPO_Seq_ID" Type="Int32" />
120 "SPO_Description" Type="String" />
121
122
123
124
125
126 "GridView1" />
127
128
129
130
131
132 "EOList" runat="server" UpdateMode="Conditional">
133
134
class="dataGrid">
135
136 | class="datagridHeader">Enabling Objects |
137
138
139 |
140 "ReorderList1" runat="server" AllowReorder="True" DataSourceID="ObjectDataSource4"
141 ItemInsertLocation="End" PostBackOnReorder="True" DataKeyField="EO_ID" DragHandleAlignment="Left" CssClass="reorderListData" EnableViewState="true">
142
143
144 "Label3" runat="server" Text='<%# Eval("EO_ID") %>' />
145 "Label1" runat="server" Text='<%# Eval("EO_Description") %>' /> :
146 "Label2" runat="server" Text='<%# Eval("EO_Seq_ID") %>' />
147
148
149
150
151 "server" ID="handle" ImageUrl="~/images/delete.png" />
152
153
154
155
156
157 |
158
159
160 "GetEO"
161 TypeName=
"EOData_Class" UpdateMethod=
"UpdateEOs"
162 LayoutType=
"User" EnableViewState=
"false" -->
163 "ObjectDataSource4" runat=
"server" DeleteMethod=
"Delete"
164 InsertMethod=
"Insert" OldValuesParameterFormatString=
"original_{0}" SelectMethod=
"GetDataBySPOID"
165 TypeName=
"TaskDSTableAdapters.dt_EOTableAdapter" UpdateMethod=
"UpdatePosition" >
166
167 "Original_EO_ID" Type=
"Int32" />
168
169
170 "EO_Seq_ID" Type=
"Int32" />
171 "Original_EO_ID" Type=
"Int32" />
172 "SPO_ID" Type=
"Int32" />
173 "EO_Description" Type=
"String" />
174
175
176 "GridView2" Name=
"SPO_ID" PropertyName=
"SelectedValue"
177 Type=
"Int32" />
178
179
180 "SPO_ID" Type=
"Int32" />
181 "EO_Seq_ID" Type=
"Int32" />
182 "EO_Description" Type=
"String" />
183
184
185
186
187 "GridView2" />
188 "ReorderList1" />
189
190
191
192
193
194