Code: Select all
Product Price
=================
Product1 10
Product2 20
Thanks.
Code: Select all
Product Price
=================
Product1 10
Product2 20
Code: Select all
private bool IsDataSourceEmpty
{
get
{
return DataSourceName == null || DataSourceName.Length == 0 || DataSource == null;
}
}
///
/// Get data source that is used for getting data.
///
[Editor(typeof(StiDataSourceEditor), typeof(UITypeEditor))]
[TypeConverter(typeof(StiDataSourceConverter))]
[StiCategory("Data")]
[StiOrder(StiPropertyOrder.DataDataSource)]
[Description("Get data source that is used for getting data.")]
public virtual StiDataSource DataSource
{
get
{
if (Page == null ||
Report == null ||
Report.DataSources == null ||
DataSourceName == null ||
DataSourceName.Length == 0)return null;
return Report.DataSources[DataSourceName];
}
}
private string dataSourceName = string.Empty;
[Browsable(false)]
[StiSerializable]
[DefaultValue("")]
///
/// Gets or sets name of the Data Source.
///
public string DataSourceName
{
get
{
return dataSourceName;
}
set
{
dataSourceName = value;
}
}
Code: Select all
private int countData = 0;
///
/// Gets or sets the count of rows for virtual data.
///
[StiSerializable]
[DefaultValue(0)]
[StiCategory("Data")]
[StiOrder(StiPropertyOrder.DataCountData)]
[Description("Gets or sets the count of rows for virtual data.")]
public virtual int CountData
{
get
{
return countData;
}
set
{
countData = value;
}
}
///
/// Sets the position at the beginning.
///
public virtual void First()
{
if (!IsDataSourceEmpty)this.DataSource.First();
else
{
this.isEofValue = false;
this.isBofValue = true;
this.positionValue = 0;
}
}
///
/// Move on the previous row.
///
public virtual void Prior()
{
if (!this.IsDataSourceEmpty)this.DataSource.Prior();
else
{
this.isBofValue = false;
this.isEofValue = false;
if (this.positionValue
/// Move on the next row.
///
public virtual void Next()
{
if (!this.IsDataSourceEmpty)this.DataSource.Next();
else
{
this.isBofValue = false;
this.isEofValue = false;
if (this.positionValue >= this.countData - 1)this.isEofValue = true;
else this.positionValue++;
}
}
///
/// Move on the last row.
///
public virtual void Last()
{
if (!this.IsDataSourceEmpty)this.DataSource.Last();
else
{
this.isEofValue = true;
this.isBofValue = false;
this.positionValue = this.countData - 1;
}
}
internal bool isEofValue = false;
///
/// Gets value indicates that the position indicates to the end of data.
///
[Browsable(false)]
public virtual bool IsEof
{
get
{
if (!this.IsDataSourceEmpty)return DataSource.IsEof;
else return isEofValue;
}
set
{
if (!this.IsDataSourceEmpty)DataSource.IsEof = value;
else isEofValue = value;
}
}
internal bool isBofValue = false;
///
/// Gets value, indicates that the position indicates to the beginning of data.
///
[Browsable(false)]
public virtual bool IsBof
{
get
{
if (!this.IsDataSourceEmpty)return DataSource.IsBof;
else return isBofValue;
}
set
{
if (!this.IsDataSourceEmpty)DataSource.IsBof = value;
else isBofValue = value;
}
}
///
/// Gets value indicates that no data.
///
[Browsable(false)]
public virtual bool IsEmpty
{
get
{
if (!this.IsDataSourceEmpty)return DataSource.IsEmpty;
else return CountData == 0;
}
}
internal int positionValue;
///
/// Gets the current position.
///
[Browsable(false)]
public virtual int Position
{
get
{
if (!this.IsDataSourceEmpty)return DataSource.Position;
return positionValue;
}
set
{
if (!this.IsDataSourceEmpty)DataSource.Position = value;
else positionValue = value;
}
}
///
/// Gets count of rows.
///
[Browsable(false)]
public virtual int Count
{
get
{
if (!this.IsDataSourceEmpty)return DataSource.Count;
return countData;
}
}
Code: Select all
StiDataHelper.SetData(this, true, Parent as StiDataBand);
Code: Select all
this.First();
for (int posIndex = 0; posIndex
/// Gets or sets the array of strings that describes rules of sorting.
///
[StiSerializable(StiSerializationVisibility.List)]
[Editor(typeof(StiSortEditor), typeof(UITypeEditor))]
[TypeConverter(typeof(StiSortConverter))]
[DefaultValue(null)]
[StiCategory("Data")]
[StiOrder(StiPropertyOrder.DataSort)]
[Description("Gets or sets the array of strings that describes rules of sorting.")]
public virtual string[] Sort
{
get
{
return sort;
}
set
{
sort = value;
}
}
Code: Select all
private StiFilterEventHandler filterMethodHandler;
///
/// Gets or sets a method for filtration.
///
[Browsable(false)]
public StiFilterEventHandler FilterMethodHandler
{
get
{
return filterMethodHandler;
}
set
{
filterMethodHandler = value;
}
}
private StiFilterMode filterMode = StiFilterMode.And;
///
/// Gets or sets filter mode.
///
[DefaultValue(StiFilterMode.And)]
[StiSerializable]
[TypeConverter(typeof(StiEnumConverter))]
[StiCategory("Data")]
[StiOrder(StiPropertyOrder.DataFilterMode)]
[Browsable(false)]
public StiFilterMode FilterMode
{
get
{
return filterMode;
}
set
{
filterMode = value;
}
}
private StiFiltersCollection filters = new StiFiltersCollection();
///
/// Gets or sets the collection of data filters.
///
[StiSerializable(StiSerializationVisibility.List)]
[StiCategory("Data")]
[StiOrder(StiPropertyOrder.DataFilters)]
[Editor(typeof(StiFiltersCollectionEditor), typeof(UITypeEditor))]
[TypeConverter(typeof(StiFiltersCollectionConverter))]
public StiFiltersCollection Filters
{
get
{
return filters;
}
set
{
filters = value;
}
}
///
/// Do not use this property.
///
[Browsable(false)]
[StiNonSerialized]
[Obsolete("Filter property is obsolete. Please use Filters property.")]
public virtual StiExpression Filter
{
get
{
if (Filters.Count == 0)Filters.Add(new StiFilter());
Filters[0].Item = StiFilterItem.Expression;
return Filters[0].Expression;
}
set
{
if (Filters.Count == 0)Filters.Add(new StiFilter());
Filters[0].Item = StiFilterItem.Expression;
Filters[0].Expression = value;
}
}
private bool filterOn = true;
///
/// Gets or sets value indicates, that filter is turn on.
///
[TypeConverter(typeof(StiBoolConverter))]
[StiCategory("Data")]
[StiOrder(StiPropertyOrder.DataFilterOn)]
[StiSerializable]
[DefaultValue(true)]
[Description("Gets or sets value indicates, that filter is turn on.")]
public virtual bool FilterOn
{
get
{
return filterOn;
}
set
{
filterOn = value;
}
}