Ticket T134695
Visible to All Users

ASPxImageSlider - How to set ASPxImageSlider.ItemTextTemplate at runtime

created 11 years ago

He there,

What I'm looking to do is add content to a TextTemplate to the ImageSliderItem object of an ASPxImageSlider control in codebehind at runtime. I want to be able to add an image url to the ImageSliderItems  and a header, a line of text and a hyperlink to each of my image panes' TextTemplate objects at runtime in the control.

I can't seem to find any material that deals with this and I have used the demo center example to setup my slider with static images, text and links for the moment.

I know that the TextTemplate property of the ImageSliderItem object impliments the ITemplate interface but what I don't know is how to arrange my data and set the properties source.

Can you please help.

Thanks.

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hi Adam,

I've created a sample project that demonstrates how to use ItemTextTemplate in ASPxImageSlider. Try it on your side and let me know if it meets your requirements.

    Show previous comments (5)
    DevExpress Support Team 11 years ago

      Hi Adam,

      I've implemented a class that builds the required markup. Try it and let me know if it meets your requirements.

        Hi Paul,
        Yes using the literal works fine, I can just alter the class to accept a string in the constructor to make the content dynamic.

        DevExpress Support Team 11 years ago

          Hi,

          I'm happy to hear that my assistance was helpful. Feel free to contact us if you have further questions.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.