Anonymous - 2007-11-01

Logged In: YES
user_id=459824
Originator: NO

Great! :) It works like a charm :) You just saved my day :) Thank you so much

public abstract class RowsSimpleBase : RowsBase
{
private readonly Dictionary<int, int> mRowHeights = new Dictionary<int,int>();

/// <summary>
/// Initializes a new instance of the <see cref="RowsSimpleBase"/> class.
/// </summary>
/// <param name="grid">The grid.</param>
public RowsSimpleBase(GridVirtual grid):base(grid)
{
mRowHeight = grid.DefaultHeight;
}

private int mRowHeight;
/// <summary>
/// Gets or sets the height of the row.
/// </summary>
/// <value>The height of the row.</value>
public int RowHeight
{
get{return mRowHeight;}
set
{
if (mRowHeight != value)
{
mRowHeight = value;
PerformLayout();
}
}
}

/// <summary>
/// Gets the height of the specified row.
/// </summary>
/// <param name="row"></param>
/// <returns></returns>
public override int GetHeight(int row)
{
if (this.mRowHeights.ContainsKey(row))
return this.mRowHeights[row];
else
return RowHeight;
}

/// <summary>
/// Sets the height of the specified row.
/// </summary>
/// <param name="row"></param>
/// <param name="height"></param>
public override void SetHeight(int row, int height)
{
this.mRowHeights[row] = height;
PerformLayout();
}
}