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

DataSource for radcarousel

4 Answers 137 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
yael lazmi
Top achievements
Rank 1
yael lazmi asked on 25 Mar 2010, 10:23 AM
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.

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 29 Mar 2010, 01:59 PM
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.
0
yael lazmi
Top achievements
Rank 1
answered on 06 Apr 2010, 07:49 AM
Hi


thank you!

0
yael lazmi
Top achievements
Rank 1
answered on 08 Apr 2010, 07:24 AM
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

0
Peter
Telerik team
answered on 08 Apr 2010, 04:27 PM
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.
Tags
Carousel
Asked by
yael lazmi
Top achievements
Rank 1
Answers by
Peter
Telerik team
yael lazmi
Top achievements
Rank 1
Share this question
or