博客园  :: 首页  :: 管理

随笔分类 -  DataGrid Control

摘要:1.设计好需要的样式表,这个可以根据大家的喜好;我这里就给个一般的。 .button_down{}{ color: Red; border: inset 2px;}.button_up{}{ color: Black; border: outset 2px;}.alt_row_highlight{}{ background-color: Yellow;}.alt_ro... 阅读全文

posted @ 2006-03-07 16:57 Paker Liu 阅读(730) 评论(2) 推荐(0)

摘要:第一种用法也是最常用的用法,估计相关的资料都比较常见;一般在.aspx文件中使用 第二种是直接在DataGird的ItemBound事件里使用DataBinder.Eval().这种用法十分灵活,如果你需要对目标数据进行一些加工处理,这种方法应该能够满足。当然,也可以使用第一种方法实现类似的功能,不过,相比较而言,还是会麻烦些。以下是关键的例子代码: DataGird1_ItemBound(,){... 阅读全文

posted @ 2006-03-07 15:45 Paker Liu 阅读(2051) 评论(0) 推荐(0)

摘要:1.这段代码是处理过长字符串的主体; void ItemDataBound(object sender, DataGridItemEventArgs e){ // Get the string to be displayed string title = GetTheString(); // Returns the updated text for the specified colu... 阅读全文

posted @ 2006-03-06 13:32 Paker Liu 阅读(522) 评论(0) 推荐(0)

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Private Sub DataGrid_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGrid... 阅读全文

posted @ 2006-02-15 13:57 Paker Liu 阅读(747) 评论(0) 推荐(0)