RadPersistenceManager and reordered RadTabStrip tabs

4 posts, 0 answers
  1. Jeff
    Jeff avatar
    14 posts
    Member since:
    Aug 2013

    Posted 17 Jul 2014 Link to this post

    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
  2. Jeff
    Jeff avatar
    14 posts
    Member since:
    Aug 2013

    Posted 17 Jul 2014 in reply to Jeff Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 21 Jul 2014 Link to this post

    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.

     
  5. Jeff
    Jeff avatar
    14 posts
    Member since:
    Aug 2013

    Posted 21 Jul 2014 in reply to Peter Filipov Link to this post

    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
Back to Top