+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Download List Control Headings

Download List Control Headings

6 posts, 0 answered
  1. Justin
    Justin avatar
    3 posts
    Registered:
    22 Dec 2009
    20 Jan 2011
    Link to this post
    I'm having issues with the Download List control whereby it's still showing attribute headings in the table even though the attribute is unchecked in step 3 of the settings.  Eg, we don't use Author and Tags so want them removed from the table altogether but unchecking these only remove the individual item data, not the entire column.

    Is there something I can do to fix this?

    Thanks in advance,
    Justin
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    20 Jan 2011
    Link to this post
    Hello Justin,

    Try mapping the external template for the control and modify its HTML

    Regards,
    Ivan Dimitrov
    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
  3. Justin
    Justin avatar
    3 posts
    Registered:
    22 Dec 2009
    20 Jan 2011
    Link to this post
    Hi Ivan,
    The problem with doing that is that it the control is then limited to only one configuration of visible columns.  Shouldn't hiding the data in the column also hide the column heading?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    21 Jan 2011
    Link to this post
    Hi Justin,

    Some of the columns left, because we use table. I can tell you how to override the behavior of the control, but this would be much harder that changing the template. Actually you can have several templates on your file system and switch them when you need to show the headings.

    If you need more details about how to implement a custom control to hide the headings, please let me know.

    Best wishes,
    Ivan Dimitrov
    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
  5. Justin
    Justin avatar
    3 posts
    Registered:
    22 Dec 2009
    21 Jan 2011
    Link to this post
    Hi Ivan,
    Yes, please provide more info.  I'd like to implement this so that in future, I can reuse old projects elsewhere without having to go through changing loads.  So an automatic solution to match the table headings with the fileds selected would be ideal.

    Thanks,
    Justin
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    21 Jan 2011
    Link to this post
    Hi Justin,

    Create a custom class that inherits from DownloadList. Override SetListMetadata and there is a parameter itemContainer which you can use to access the Reapter control that is used inside DownloadListTableMode.ascx template. You should expose public properties for each  item in the HeaderTemplate, so you can control whether to show the control or not.

    sample

    public class DownloadListCuston : DownloadList
    {
         
     
        protected override void SetItemMetadata(System.Web.UI.Control itemContainer, Telerik.Cms.Engine.IContent contentItem)
        {
            base.SetItemMetadata(itemContainer, contentItem);
     
            ITextControl extension = itemContainer.FindControl("Extension") as ITextControl;
     
        }
     
    }


    Best wishes,
    Ivan Dimitrov
    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
Register for webinar
6 posts, 0 answered