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

RadPersistenceManager and reordered RadTabStrip tabs

3 Answers 79 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 17 Jul 2014, 07:35 PM
Hi,

I've got the RadPersistenceManager working, saving my RadTabStrip.  However, looking at the XML (and confirmed here) the only attribute of the entire RadTabStrip that is persisted, despite almost 1K of XML, is an integer indicating the 0-based index of the Selected tab.

<Name>SelectedIndices</Name>
<Value Type="System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]">
  <ArrayOfString>
    <string>4</string>
  </ArrayOfString>
</Value>

I suppose that's useful in some cases but what seems to me to be much more useful is to persist the order of the tabs. I have tab reordering enabled and, having done so, I thought it would be natural to add the RadTabStrip to the RadPersistenceManager's PersistenceSettings and reload that tab order when the page is reloaded.  (E.g. enabling users to reorder the tabs how they prefer.)

However, obviously because the tab order is not saved, when I reload the tab strip the tabs are restored in their default order, but the tab that is now Selected is potentially some other tab entirely because they've been un-reordered.

I have two requests:

1) When saving a RadTabStrip, the RadPersistenceManager should save both the Selected tab AND the tabs' order.
2) When saving a RadTabStrip, the RadPersistenceManager should save the Selected tab's name, or other unique identifier, instead of overloading its index as a unique ID.  Restoring the Selected tab by its index is less than useless if you allow tab reordering.

In fact, I would dump the persistence of the Selected tab altogether, if it's only going to be done by index.  It's meaningless in the context of reordering tabs.

Thanks,
~Jeff

3 Answers, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 17 Jul 2014, 08:55 PM
For the record, I already looked through this documentation on Loading Tabs from XML.  That seems very much like what the RadPersistenceManager should be doing.

Thanks,
~Jeff
0
Peter Filipov
Telerik team
answered on 21 Jul 2014, 11:02 AM
Hi Jeff,

Thank you for your feedback. We will consider your suggestions.
In case that you want to persist some custom information it is possible to do it with custom settings. E.g. saving the order of the tabs. After this on load to find them and insert them in the Tabs collection and remove the duplicates.

Regards,
Peter Filipov
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
Jeff
Top achievements
Rank 1
answered on 21 Jul 2014, 02:46 PM
Hi Peter,

Thank you for getting back to me.  I'll have a look at using the persistence manager's custom settings functionality as a workaround.

Regards,
~Jeff
Tags
TabStrip
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Peter Filipov
Telerik team
Share this question
or