ReorderList Control

May 23, 2008 at 9:41 AM
Edited May 23, 2008 at 10:00 AM

I am unable to reorder items of ReorderList. DataSource attribute of this control is set to XmlDataSource. I get message while reordering items "Reorder failed. See details below. Failed to reorder".

I think that I must write function which will update xml file with data after reordering items of ReorderList.

Is this a good idea? And if it is, what should I do to make it work.

Code for the ReorderList Control:

<cc1:ReorderList runat="server" ID="rol1" DataSourceID="XmlDataSource1" SortOrderField="sort" DataKeyField="name"
PostBackOnReorder="false" AllowReorder="true" ItemInsertLocation="Beginning">
      <%#XPath("id") %>
        <asp:Panel ID="reorderPanel" runat="server" CssClass="reorderCue"></asp:Panel>
        <div class="dragHandle"></div>

Code for the XmlDataSource Control:

<asp:xmldatasource id="XmlDataSource1" runat="server" DataFile="~/XMLFile.xml" XPath="source/dane" />

and this is xml file:
<?xml version="1.0" encoding="utf-8" ?>
  <dane name="a1" sort="1">
  <dane name="a2" sort="2">
  <dane name="a3" sort="3">