Welcome Guest Search | Active Topics | Sign In | Register

ZoomPanelTemplate for programmatically created ImageZoom Options
danparks
Posted: Sunday, February 20, 2011 9:25:43 PM
Rank: Newbie
Groups: Member

Joined: 1/14/2010
Posts: 3
I've successfully created an ImageZoom control in code. However, I can't figure out how to add the ZoomPanelTemplate. If I was adding the control in the aspx file it would look like this:

<ZoomPanelTemplate>
<div>
{var:big_image}
</div>
</ZoomPanelTemplate>

How do I do that programmatically? There is a ZoomPanelTemplate field, but I can't figure out how to add the div and var to it:

ImageZoom theImage = new ImageZoom();
...
...
theImage.ZoomPanelTemplate ????

eo_support
Posted: Monday, February 21, 2011 8:57:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

ZoomPanelTemplate is an ITemplate. So you will need to create a class that implement ITemplate, then create an instance of that class and assign the instance to ZoomPanelTemplate. If you are not familiar with that, you can Google "add template column" online and you should find plenty of articles explaining how to dynamically add a template DataGrid/GridView column programmatically. It's the same as that. This is not anything particular to our controls.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.