DataGrid中删除最后一页的记录时出错的解决办法!




 1
         int DataCount = dtLoadLog1.Rows.Count;
 2     if(DataCount==0)
 3     {
 4        dg_log.CurrentPageIndex=0;
 5     }

 6     else
 7    {
 8        int i=DataCount % dg_log.PageSize;
 9         if(i==0)
10         {
11        dg_log.CurrentPageIndex=dg_log.PageCount-2;
12                
13        }

14            
15     }

   

posted @ 2006-03-01 16:28  野狼的天空  阅读(164)  评论(0编辑  收藏  举报