Is IEditableCollectionView supported?

7 posts, 1 answers
  1. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 10 Nov 2014 Link to this post

    If I bind the RadTabControl to a class that implements IEditableCollectionView and IEditableCollectionView.NewItemPlaceholderPosition = NewItemPlaceholderPosition.AtEnd, and CanAddNew = true, will the RadTabControl display a new tab header for the new item place holder?  I've tried but cant make it do so.

    Thanks,

    Scott
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 13 Nov 2014 Link to this post

    Hello Scott,

    I am not sure how exactly you have tried to implement this interface. In my understanding it should be a wrapper for a collection. It should provide only editing capabilities to the wrapped collection.

    Please take a look at the attached project and see how I implemented this interface. 

    Regards,
    Pavel R. Pavlov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 13 Nov 2014 in reply to Pavel R. Pavlov Link to this post

    Thanks, that's basically what I've done.  However you will notice that when you run your sample none of the methods in the interface are called.  What I was hoping for was that NewItemPlaceholderPosition would be called and if it returned something other than none, then a placeholder new tab (like you get in Firefox) would be shown.  I think you are just confirming that this interface is not supported but please correct me if I'm wrong.
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 17 Nov 2014 Link to this post

    Hello,

    You are right that the methods in the interface are not invoked. This however is expected because they are not called from inside the collection nor the NewItemPlaceholderPosition is bound or set. There is no one who interacts with those methods and properties. This entirely depends on your custom implementation. 

    As for the interface itself - it is supported by the RadTabControl. The interface only defines a structure. If the underlying collection respects that structure you will be able to use the collection with the RadTabControl. 

    Could you please provide us more details regarding your requirements? What exactly you want to happen when you use the custom collection? What exactly should be the behavior of the collection?

    Regards,
    Pavel R. Pavlov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 17 Nov 2014 in reply to Pavel R. Pavlov Link to this post

    What I was hoping for was tab behaviour like in Firefox/IE where you get a special tab for the "NewItemPlaceholderPosition", i.e. for Firefox that is a plus (+) sign.
  7. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 20 Nov 2014 Link to this post

    Hi,

    I now understand your requirement. You can achieve your goal by using an ItemContainerStyleSelector to change the look of the last item. You can use a button in that item to trigger a command that will add a new tab in your ViewModel.

    I attached a project demonstrating this approach. It is a WPF project but the approach in Silverlight is just the same.

    Please take a look at it and let me know if you have any other questions.

    Regards,
    Pavel R. Pavlov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 20 Nov 2014 in reply to Pavel R. Pavlov Link to this post

    Thanks, that's basically what I have except in a behaviour.
Back to Top
DevCraft banner