当前位置:中国站长下载文章中心网页编程.NET编程 → 创建固定表头、表格体滚动的DataGrid

创建固定表头、表格体滚动的DataGrid

减小字体 增大字体 作者:不详  来源:不详  发布时间:2006-8-14 9:15:25
b
  
   Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, _
   ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound
   If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
   If e.Item.Cells(0).Text.Length > 26 Then
   e.Item.Cells(0).Attributes.Add("Title", e.Item.Cells(0).Text)
   e.Item.Cells(0).Text = e.Item.Cells(0).Text.Substring(0, 26) + "…"
   End If
   e.Item.Cells(1).Text = Format(System.Convert.ToDateTime(e.Item.Cells(1).Text),_
   "yyyy年M月d日 h点m分s秒")
   End If
   End Sub
  End Class
  
  
    做人要厚道,请注明转自chinazhan中国站长(www.ChinaZhan.com)。

上一页  [1] [2]