This is a migrated thread and some comments may be shown as answers.

Is IEditableCollectionView supported?

6 Answers 64 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Scott Waye
Top achievements
Rank 2
Veteran
Iron
Scott Waye asked on 10 Nov 2014, 09:15 PM
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

6 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 13 Nov 2014, 11:33 AM
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.

 
0
Scott Waye
Top achievements
Rank 2
Veteran
Iron
answered on 13 Nov 2014, 12:03 PM
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.
0
Pavel R. Pavlov
Telerik team
answered on 17 Nov 2014, 09:47 AM
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.

 
0
Scott Waye
Top achievements
Rank 2
Veteran
Iron
answered on 17 Nov 2014, 08:15 PM
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.
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 20 Nov 2014, 08:05 AM
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.

 
0
Scott Waye
Top achievements
Rank 2
Veteran
Iron
answered on 20 Nov 2014, 01:17 PM
Thanks, that's basically what I have except in a behaviour.
Tags
TabControl
Asked by
Scott Waye
Top achievements
Rank 2
Veteran
Iron
Answers by
Pavel R. Pavlov
Telerik team
Scott Waye
Top achievements
Rank 2
Veteran
Iron
Share this question
or