Esempio n. 1
0
 protected void CartPageChanged(object sender, DataGridPageChangedEventArgs e)
 {
     // (re)bind the data when the page changes
     cart.CurrentPageIndex = e.NewPageIndex;
     cart.DataSource       = myCart.GetCartItems();
     cart.DataBind();
 }
Esempio n. 2
0
 /// <summary>
 /// Function called the user is trying to go
 /// forward or backwards through the cart items list
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void CartPageChanged(object sender, DataGridPageChangedEventArgs e)
 {
     //Udpate the page the cart is position on
     cart.CurrentPageIndex = e.NewPageIndex;
     //Rebind the cart items to the page
     cart.DataSource = myCart.GetCartItems();
     cart.DataBind();
 }