导航

页脚绑定

Posted on 2007-08-01 10:20  小西  阅读(174)  评论(0)    收藏  举报
if(e.Item.ItemType==ListItemType.Footer)
            
{
                TableCell TbCell 
= new TableCell();
                TbCell.Text
="";

                TableCell mycell 
= new TableCell();
                mycell.Text 
= "共有记录:<font color=red>"+Record+" </font>条,<font color=red> 15 </font> 条每页,共有:<font color=red> "+MaxPerPage+" </font>页";    
                mycell.ColumnSpan
=8;
                
                
//e.Item
                e.Item.Cells.Clear();
                e.Item.Cells.Add(TbCell);
                e.Item.Cells.Add(mycell);
                e.Item.Cells[
1].HorizontalAlign=HorizontalAlign.Left;
                
        
            }




if(e.Item.ItemType == ListItemType.Footer)
{
   TableCell mycell 
= new TableCell();
                mycell.Text 
= "共有记录:<font color=red>"+Record+" </font>条,<font color=red> 10 </font> 条每页,共有:<font color=red> "+MaxPerPage+" </font>页";    
                mycell.ColumnSpan 
= 16;
                e.Item.Cells.Clear();
                e.Item.Cells.Add(mycell);
                e.Item.Cells[
0].HorizontalAlign=HorizontalAlign.Left;
            }