witam,

chciałbym na stronie zastosować kontrolkę ReorderList. Źródłem danych dla tej kontrolki jest XmlDataSource. Wszystko przebiegało dobrze aż do momentu, w którym zamieniłem miejscami dwie pozycje z listy. Pojawił się następujący komunikat:

user image

Z tego co wiem w przypadku, gdy źródłem danych dla ReorderList jest sqlDataSource dodaje się do tej komendy UPDATE I INSERT. Nie wiem jak to powinno wyglądać w moim przypadku.

oto kod dla kontrolki ReorderList:

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

kod XmlDataSource:

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