Hi,
I m tring to extend the asp:Repeater to with datapager..
the code its note working 100% could anyone help please to make it efficient?
this will be a useful control for everyone..
enter code here
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ExtendRepeater
{
[ToolboxData("<{0}:ExtendRepeater runat=server>")]
public class ExtendRepeater : Repeater, IPageableItemContainer
{
#region IPageableItemContainer Members
private int _startRowIndex = -1;
private int _maximumRows = -1;
private bool _databind = false;
public int MaximumRows
{
get { return _maximumRows; }
}
public int StartRowIndex
{
get
{
return _startRowIndex;
}
}
public void SetPageProperties(int startRowIndex, int maximumRows, bool databind)
{
_startRowIndex = startRowIndex;
_maximumRows = maximumRows;
if (TotalRowCountAvailable != null)
{
TotalRowCountAvailable(this, new PageEventArgs(_startRowIndex, _maximumRows, 5));
}
}
protected override void OnDataBinding(System.EventArgs e)
{
base.OnDataBinding(e);
}
protected override System.Collections.IEnumerable GetData()
{
return base.GetData();
}
public event System.EventHandler<PageEventArgs> TotalRowCountAvailable;
#endregion
}
}