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

Image with text fields

3 Answers 57 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Claude
Top achievements
Rank 1
Claude asked on 20 Jun 2010, 04:27 PM
I have a background image that will be the same for all items, but I want 3 lines of text in front of the image that will vary for each item.  The text will be coing from a database.   

I cannot figure out which type of item I should use and how to bind the 3 text fields.  I am using VB on this one. 

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 24 Jun 2010, 08:39 AM
Hi Claude,

Thanks for writing.

After setting the background image, in order to put the text you can use RadLabel element (or RadButtonElement). Make sure that TextWrap property is set to true and set a MaxSize at your discretion in order to have the text on a few lines.

Concerning the process of binding the text of the elements to a database, please take a look at this article. Basically, you should use the following approach:
Sub radCarousel1_ItemDataBound(sender as object, e as ItemDataBoundEventArgs )
Dim
textFromDataBase as string = ....(extract text from e)
me.radLabel1.Text = textFromDataBase
me.radLabel1.Image = myImage
me.radLabel1.TextImageRelation = TextImageRelation.Overlay

For each item simply use the above approach to set the text. 

I hope you find this information helpful. If you have any other questions, do not hesitate to contact us.

Kind 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
igumen
Top achievements
Rank 1
answered on 29 Sep 2010, 01:11 PM
Interesting code. Thanks.

But my question is some Harder:
Does anybody read or heard about any opportunities to make own "Elemets" for RadCarousel?  It is neccessary for my current work.

Thx

0
Vassil Petev
Telerik team
answered on 29 Sep 2010, 01:39 PM
Hi igumen,

From the information provided, we are not sure what your requirements are. Please, review the Carousel Documentation and if you still have questions, please open a new support ticket and describe your requirements in detail so that we can assist you.


Kind regards,
Vassil
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
Claude
Top achievements
Rank 1
Answers by
Peter
Telerik team
igumen
Top achievements
Rank 1
Vassil Petev
Telerik team
Share this question
or