Converting from ListBox to DataBoundListBox

8 posts, 0 answers
  1. Phil
    Phil avatar
    2 posts
    Member since:
    Oct 2010

    Posted 22 Mar 2011 Link to this post

    I've got a plain ListBox and I wanted to convert it to a DataBoundListBox simply by changing the element name in the XAML - this almost worked, apparently DataBoundListBox does not have an ItemsPanel template property - how would I convert that template over to DataBoundListBox?
  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 23 Mar 2011 Link to this post

    Hello Phil,

    Thanks for contacting us and for your question.

    The RadDataBoundListBox control does not have the ItemsPanel property since it does not support this functionality. The idea of RadDataBoundListBox is to provide the functionality of the standard ListBox by significantly improving its performance and still providing UI virtualization capablities.

    Could you please share with us some further details on your scenario so that we can consider similar cases for future releases? 

    Best wishes,
    Deyan
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Phil
    Phil avatar
    2 posts
    Member since:
    Oct 2010

    Posted 23 Mar 2011 Link to this post

    I'm mimicking the appearance of the start menu by overriding the ListBox ItemsPanel template to use a WrapPanel, and then the Item template is an accent-colored square.
  5. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 24 Mar 2011 Link to this post

    Hello Phil,

    Thanks for getting back to us and for the provided details.

    For this scenario, you could use the standard ListBox control and RadWrapPanel as an items panel. RadDataBoundListBox currently uses only one layout strategy - the one of a vertical stack panel - and performs UI virtualization in this context. It is possible to extend the virtualization mechanism to support different layout strategies but I cannot give you an exact confirmation of whether or when we will implement this.

    Do not hesitate to get back to us in case of further questions.

    Regards,
    Deyan
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  6. Matthew
    Matthew avatar
    32 posts
    Member since:
    Oct 2011

    Posted 12 Nov 2011 Link to this post

    Well really the good reason to allow the 'WrapPanel' functionality in the RadDataBoundListBox is consistency. I think it would be nice to be able to choose just one type of list box in an app and stick with it. My reasons would be the EmptyContent functionality of Telerik version of the ListBox. I've mimicked it, yeah, with extra value converters and what-not, so that I can Wrap content. It would just be nice to have xaml that looks the same in each page instead of Rad here and List there on each page.

    Maybe that makes sense. :-)
  7. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 14 Nov 2011 Link to this post

    Hi Matthew,

    Thanks for getting back to us and for your feedback.

    Indeed, you're completely right. We will structure our development plans in this direction and I hope that we will be able to provide an out of the box support for virtualized wrap layout in RadDataBoundListBox very soon.

    Do not hesitate to get back to us in case you have further questions or need assistance.

    All the best,
    Deyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Thomas
    Thomas avatar
    6 posts
    Member since:
    May 2011

    Posted 08 Jan 2012 Link to this post

    The orientation is most likely what was needed to be changed from a top to bottom -> left to right.  While RadSlideView would be a good alternative that is already available, it is more for pictures and slideshow like information.  A list could have more than just a single middle item and a hint that there are more on the left and right.  To change a listbox's orientation, you set the stackpanel's orientation and alter the scrollbar modes.  With RadDataBoundListBox, you cannot change the orientation.  It would be nice to have a simple toggle for orientation that would take care of both of these steps for us in a future release.

    Thomas Mullen
    tjmullenpresents.com
  9. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 09 Jan 2012 Link to this post

    Hi Thomas,

    Thanks for writing and for your suggestion.

    I would like to inform you that this feature (scrolling orientation support in DataBoundListBox) is already in the works and we hope that it will be available for Q1 2012.

    Let me know if you have further questions or need assistance.

    Regards,
    Deyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner