+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / removing an item from ILibrary programatically

removing an item from ILibrary programatically

3 posts, 1 answered
  1. Josh
    Josh  avatar
    25 posts
    Registered:
    28 Apr 2009
    20 Oct 2010
    Link to this post
    Hi,

    I was wondering how to remove an item from an ILibrary programatically. Its not working.

    LibraryManager libraryManager = new LibraryManager(DEFAULT_NEWS_RELEASE_LIBRARY_PROVIDER);
    ILibrary NewsReleaseInTranscation = libraryManager.GetLibrary(myGuid);
    NewsReleaseInTranscation.GetItems().RemoveAt(index);
    libraryManager.SaveLibrary(NewsReleaseInTranscation);

    I tried using both remove and removeAt methods without any success.  Please help.

    Regards,

    Josh
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    20 Oct 2010
    Link to this post
    Hello Josh ,

    There are methods of LibraryManager class that you can use

    • DeleteLibrary - deletes a library
    • DeleteContent - deletes an IContent object (item) from a library.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Josh
    Josh  avatar
    25 posts
    Registered:
    28 Apr 2009
    20 Oct 2010
    Link to this post
    Thanks Ivan,

    I actually found that method 30 minutes afterwards.

    Regards
Register for webinar
3 posts, 1 answered