Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
265
Change PopupGallery preview image programatically
posted

Hi

We have a popup gallery of employee photos that the user can use to select an employee.

There are also a couple of other ways the user can select an employee. If the user uses one of these ways, then we want to update the photo in the popup gallery preview area (as if the user selected it).

I can't find a way to do this. I've tried gallery.selecteditem and photo.bringintoview.

Thanks

Parents
  • 44743
    posted

    I was able to do this with the SelectedItem property and BringIntoView method with this code:

    PopupGalleryTool rootTool = (PopupGalleryTool)this.ultraToolbarsManager1.Tools["PopupGalleryTool1"];
    PopupGalleryTool instanceTool = (PopupGalleryTool)rootTool.SharedProps.ToolInstances[0];

    rootTool.SelectedItem = rootTool.Items["Item5"];
    rootTool.SelectedItem.BringIntoView(instanceTool, null, GalleryArea.Preview);

Reply Children