Hi,
I am trying to add the property layout with Repeat Columns,Repeat Directions and Repeat Layout in CMSWebParts\Ecommerce\Products\TopNProductsBySales.ascx.cs but when clicking on the webpart's properties i can't see the customized Document property. Can you tell me if there is something missing in my code?
/// <summary>
/// Gets or sets the count of repeat columns
/// </summary>
public int RepeatColumns
{
get
{
return ValidationHelper.GetInteger(GetValue("RepeatColumns"), this.lstElem.RepeatColumns);
}
set
{
this.SetValue("RepeatColumns", value);
this.lstElem.RepeatColumns = value;
}
}
/// <summary>
/// Gets or sets whether control is displayed in a table or flow layout
/// </summary>
public RepeatLayout RepeatLayout
{
get
{
return CMSDataList.GetRepeatLayout(DataHelper.GetNotEmpty(GetValue("RepeatLayout"), this.lstElem.RepeatLayout.ToString()));
}
set
{
this.SetValue("RepeatLayout", value.ToString());
this.lstElem.RepeatLayout = value;
}
}
/// <summary>
/// Gets or sets whether DataList control displays vertically or horizontally
/// </summary>
public RepeatDirection RepeatDirection
{
get
{
return CMSDataList.GetRepeatDirection(DataHelper.GetNotEmpty(GetValue("RepeatDirection"), this.lstElem.RepeatDirection.ToString()));
}
set
{
this.SetValue("RepeatDirection", value.ToString());
this.lstElem.RepeatDirection = value;
}
}
/// <summary>
/// Gets or sets the columns to get
/// </summary>
public string Columns
{
get
{
return DataHelper.GetNotEmpty(GetValue("Columns"), this.lstElem.Columns);
}
set
{
this.SetValue("Columns", value);
this.lstElem.Columns = value;
}
}
/// <summary>
/// Initializes the control properties
/// </summary>
protected void SetupControl()
{
if (this.StopProcessing)
{
this.lstElem.StopProcessing = true;
}
else
{
this.lstElem.ControlContext = this.ControlContext;
// System settings
this.lstElem.CacheItemName = this.CacheItemName;
this.lstElem.CacheDependencies = this.CacheDependencies;
this.lstElem.CacheMinutes = this.CacheMinutes;
this.lstElem.CheckPermissions = this.CheckPermissions;
// Document properties
this.lstElem.SiteName = this.SiteName;
this.lstElem.ClassNames = this.ClassNames;
this.lstElem.Path = this.Path;
this.lstElem.Columns = this.Columns;
this.lstElem.MaxRelativeLevel = this.MaxRelativeLevel;
this.lstElem.SelectOnlyPublished = this.SelectOnlyPublished;
this.lstElem.CombineWithDefaultCulture = this.CombineWithDefaultCulture;
this.lstElem.CultureCode = this.CultureCode;
this.lstElem.SelectTopN = this.SelectTopN;
this.lstElem.WhereCondition = GetWhereCondition(this.WhereCondition);
this.lstElem.OrderBy = GetOrderByExpression(this.OrderBy);
// Transformations
this.lstElem.AlternatingTransformationName = this.AlternatingTransformationName;
this.lstElem.TransformationName = this.TransformationName;
//// Public
this.lstElem.HideControlForZeroRows = this.HideControlForZeroRows;
this.lstElem.ZeroRowsText = this.ZeroRowsText;
this.lstElem.RepeatColumns = this.RepeatColumns;
this.lstElem.RepeatLayout = this.RepeatLayout;
this.lstElem.RepeatDirection = this.RepeatDirection;
}
}