DataSource for radcarousel

5 posts, 0 answers
  1. yael lazmi
    yael lazmi avatar
    3 posts
    Member since:
    Mar 2010

    Posted 25 Mar 2010 Link to this post

    Hi

    I want to give a datatable datasource for the radcarousel  ,

    I need that the carousel RadbuttonElements will be dinamic

    i'm familiar with the manual way ( one by one) , I want to know the way to declare once the DataSource ( radcarousel1.datasource=datatable) without the enumeration ( for each) 

    pls help me, its urgent!!!
    thank you.
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 29 Mar 2010 Link to this post

    Hi yael lazmi,

    Thank you for interest in RadControls for WinForms. In order to databind RadCarousel you should:

    1) Assign the RadCarousel DataSource property.
    2) Handle the NewCarouselItemCreating event. In the event handler, create a RadItem (or RadButtonElement) descendant instance.
    3) Handle the ItemDataBound event. In this event you have access to both the data item and to the RadItem instance.

    For more information please read carousel data binding help article and take a look on our Demo application -> Carousel -> Music library example.


    Regards,
    Peter
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. yael lazmi
    yael lazmi avatar
    3 posts
    Member since:
    Mar 2010

    Posted 06 Apr 2010 Link to this post

    Hi


    thank you!

  5. yael lazmi
    yael lazmi avatar
    3 posts
    Member since:
    Mar 2010

    Posted 08 Apr 2010 Link to this post

    Hi

    after I add radbuttonelement and delete the text from his properties
    i get an error and the project is stuck
    i have to kill the process from the task manager.
    i attached print screen of the problem.
    please help'
    thanks
    yael

  6. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 08 Apr 2010 Link to this post

    Hi Yael,

    Thanks for contacting us.
     
    The size mode of the RadButtonElement by default is AutoSize=True - in this case, the size of the RadButtonElement depends only on its content. In case that you removed all content (text & image), the button element will be with empty size and this leads to the exception in carousel's reflection primitive. So if you want to show an empty button turn off the AutoSize and set an appropriate MinSize manually.
     
    However, I cannot reproduce the issue locally because the button still has 2,2 size after removing the text (refer to the screenshot).
     
    Hope this helps.

    Greetings,
    Peter
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for WinForms is Visual Studio 2017 Ready