More in this section
Forums / Developing with Sitefinity / how to get records and images and display on page which are saved by module bulider

how to get records and images and display on page which are saved by module bulider

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Manoj
    Manoj avatar
    1 posts
    02 Aug 2012
    14 Feb 2012
    Link to this post
    i have one case  where i created one module with  siteinfinity  4.4 and save some records and stroe images .
    i am able  display the  records using following code
    But how i will  display  image . or how i get  image url
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DisplayItems.ascx.cs" Inherits="SitefinityWebApp.DisplayItems" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!-- ScriptManager or RadScriptManager is required by RadGrid, but this tag probably already exists on the Master Template -->
    <!-- <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> -->
    <telerik:radgrid id="Grid" runat="server" autogeneratecolumns="False">
                <telerik:gridboundcolumn datafield="Title" headertext="Title">
    // ~/DisplayItems.ascx.cs
    using System;
    using System.Linq;
    using System.Collections.Generic;
    using Telerik.Sitefinity.Model;
    using Telerik.Sitefinity.DynamicModules;
    using Telerik.Sitefinity.Data.Linq.Dynamic;
    using Telerik.Sitefinity.DynamicModules.Model;
    using Telerik.Sitefinity.Utilities.TypeConverters;
    using Telerik.Sitefinity.GenericContent.Model;
    namespace SitefinityWebApp
        public partial class DisplayItems : System.Web.UI.UserControl
            protected void Page_Load(object sender, EventArgs e)
                DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
                Type profileManagerType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.ProfileManager.ProfileManager");
                // Fetch a collection of "live" and "visible" Person items.
                var myCollection = dynamicModuleManager.GetDataItems(profileManagerType).Where(i => i.Status == ContentLifecycleStatus.Live && i.Visible == true);
                // Binds the collection of Person items to the RadGrid
                Grid.DataSource = myCollection;
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    18 Sep 2017
    17 Feb 2012
    Link to this post

     Get the module item or items and then call GetValue() you will need to add
    using Telerik.Sitefinity.Model;

    var myFilteredCollection = dynamicModuleManager.GetDataItem(cupType, new Guid( ... guid here)).GetValue("image");
    //the image field is called "image" GetValue() gets the value of a field by its name

    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Irfan
    Irfan avatar
    1 posts
    28 Aug 2012
    06 Sep 2012
    Link to this post
    how to get images from image gallery & bind it with Grid View?
3 posts, 0 answered