<asp:SqlDataSource ID="sdsMenu"SelectCommand="SELECT NodeId, ParentNodeId, sidnamn, NavigateUrl, target FROM sv_sidor where NodeId NOT BETWEEN @start AND @end Order By SortId ASC, NodeId ASC"ConnectionString="<%$ ConnectionStrings:sdsSleddogConn %>"runat="server">
Would you please check again if all the records returned from the "SELECT * from sv_sidor WHERE (NodeId NOT BETWEEN @start AND @end) and ([ParentNodeId] is NULL or [ParentNodeId] not BETWEEN @start AND @end)" query have correct parentIds? For example the record with id 10 that has parentId 67, is there node with id 67 that exists in the filtered list?
If everything is correct, I would like to ask you to prepare a simplified sample runnable project and send it to us. Thus, we would be able to investigate locally and help you more efficiently.
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.