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

RadCorousel with GroupBox and Grid

1 Answer 66 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Carlos asked on 15 Jul 2010, 08:40 PM

Hello everyone, my question is this.  
I have a RadCorousel control in my application.

I’d like to know if it’s possible to add other controls (like GroupBox, Grid, Charts and so on..)

If it’s possible, How can I do that?

Thank you..

1 Answer, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 20 Jul 2010, 05:41 PM
Hello Carlos,

Thanks for writing.

Adding custom controls to RadCarousel is actually quite easy, but it might also lead to undesired consequences. Please note that RadGridView, RadChart, etc. are quite complex controls and adding them in RadCarousel will surely introduce performance issues. To avoid this, our team suggests you to use images instead of controls. Adding an image of RadChart instead of the RadChart itself, will be much lighter and easier for your application and thus you will avoid any performance issues.

The code snippet below illustrates how to add a RadChart image as item of RadCarousel:

RadChart myChart = new RadChart();
myChart.Size = new Size(200,200);
Image chartAsImage = myChart.GetBitmap();
RadImageItem imageItem = new RadImageItem();
imageItem.Image = chartAsImage;
this.radCarousel1.Items.Add(imageItem);

Similarly, you can add a RadGridView image:

RadGridView radGridView1 = new RadGridView();
radGridView1.Size = new Size(300, 300);
radGridView1.BeginInit();
radGridView1.BindingContext = new BindingContext();
radGridView1.Size = new Size(200, 200);
radGridView1.EndInit();
radGridView1.LoadElementTree();
Bitmap gridAsImage = radGridView1.RootElement.GetAsBitmap(Brushes.White, 0, new SizeF(1, 1));
RadImageItem imageItem2 = new RadImageItem();
imageItem2.Image = gridAsImage;
this.radCarousel1.Items.Add(imageItem2);

I hope you find my answer useful. Let me know if I can assist you further.

Sincerely yours,
Boryana
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
Carlos
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Share this question
or