ListView pagination problem.
am 27.12.2007 20:26:16 von George Ter-SaakovTrying to quickly create paginated grid. So i am using ListView.
Unfortunatelly pagination works a little strange.
Pagination control appears correctly.
But when i click "2" page postback happens but current page is still first
page. Then i click "3" page. Postback happens but current page is now "2"
page. Then i click "4" page and again postback happens and page 3 becomes
current.
Why is that? How to make it work?
Bellow you can find my code (Nothing else like code or any other control is
on the page)
thanks
George.
-----------------
protected override void OnInit(EventArgs e)
{
if( !isPostBack )
{
grdItems.DataSource = clsGlobal.GetData("SELECT Id,Name FROM
tblMy");
grdItems.DataBind();
}
}
----------------------
Id
Name
<%# Eval("Id") %>
<%# Eval("Name") %>