Microsoft
Software
Hardware
Network
Question : Update method of objectdatasource is not being triggered by reorderlist
I am trying to reorder the items using ajaxcontroltoolkit ReorderList by using objectdatasource.
ReorderList is defined as;
<div class="reorderListDemo">
<ajaxToolkit:ReorderList ID="ReorderList1" runat="server" PostBackOnReorder="true"
DataSourceID="PanelsDataSo
urce" CallbackCssStyle="callback
Style" DataKeyField="pnlidd"
SortOrderField="pnlord" AllowReorder="True"
onitemreorder="ReorderList
1_ItemReor
der">
<ItemTemplate>
<div class="itemArea">
<asp:Label ID="lblPnlCode" runat="server" Text='<%# HttpUtility.HtmlEncode(Con
vert.ToStr
ing(Eval("
pnlcod")))
%>' />
<span> :: </span>
<asp:Label ID="lblPnlTxt" runat="server" Text='<%# HttpUtility.HtmlEncode(Con
vert.ToStr
ing(Eval("
pnltxt")))
%>' />
</div>
</ItemTemplate>
<EmptyListTemplate>
<%--This template will show up if there were no items in the database to reorder.--%>
<div>
No items exist.
</div>
</EmptyListTemplate>
<EditItemTemplate>
<div class="itemArea">
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("pnlcod") %>' ValidationGroup="edit" />
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("pnltxt") %>' ValidationGroup="edit" />
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("pnlord") %>' ValidationGroup="edit" />
</div>
</EditItemTemplate>
<ReorderTemplate>
<asp:Panel ID="Panel2" runat="server" CssClass="reorderCue" />
</ReorderTemplate>
<DragHandleTemplate>
<div class="dragHandle">
</div>
</DragHandleTemplate>
</ajaxToolkit:ReorderList>
</div>
while ObjectDataSource is;
<asp:ObjectDataSource ID="PanelsDataSource" runat="server" SelectMethod="GetPanelForR
eOrder"
TypeName="BLPanels" UpdateMethod="ReorderPanel
">
<UpdateParameters>
<asp:Parameter Name="pnlId" Type="Int32" />
<asp:Parameter Name="pnlCode" Type="String" />
<asp:Parameter Name="pnlTxt" Type="String" />
<asp:Parameter Name="pnlOdr" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
In the Class BLPanel I have two methods for Select and Update but on reordering it is not calling the update method.
Please help!
Answer : Update method of objectdatasource is not being triggered by reorderlist
You have an event called "ReorderList1_ItemReorder"
, that's where you can update your reorder. It doesn't trigger the update method in the objectdatasource because this is not implemented in the ReorderList from the AjaxControlToolkit.
Random Solutions
convert c++ delegate parameters for managed code
Best way to "reimage" office computers so that they all have same OS
How to convert non ansi outer join =* to ansi outer join
can't change password through OWA 2010
How can I edit my Excel list to include only one entry from each domain name
dladm show-link -s -i output
Can WordPress be customized to some degree by manipulating files embeded in the WordPress file path
Can not get mysql to work with IIS7 Drupal and PHP
Should Sys Admins (Domain Admins) also have user accounts?
Outlook 2007 Tasks sending out automatic status reports (updates) when attachments are opened