一个下拉列表mylist,一个确定按钮和一个datagrid控件

如果单击确定按钮,这个datarid可以显示所有属于mylist.selecteditem.text类中的商品信息.datagrid可以分页(1 2 3 4 .......)

现在的问题是:
   如果当前是a类商品的第3页,当我选择b类商品,点击确定按钮后,就会出现

"Server Error in '/' Application.
--------------------------------------------------------------------------------

Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount. "
这样的错误信息。谁能帮我解决这个问题,小弟将感激不尽。