摘要: <%# Bind("Subject") %> //绑定字段<%# Container.DataItemIndex + 1%> //实现自动编号<%# DataBinder.Eval(Container.DataItem, "[n]") %> 通常使用的方法<%# DataBinder.Eval(Container.DataItem, "ColumnName") %> <%# DataBinder.Eval(Container.DataItem, "ColumnName&q 阅读全文
posted @ 2011-09-27 15:53 左小夕 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 在VS2005开发环境下,DataGrid控件是默认隐藏的,在这里可以使用DataGridView控件,它是DataGrid的继承者,并且功能很强大,使用大致和DataGrid差不多。有了GridView为什么VS2005还要保留DataGrid呢?保留该控件的目的是为了兼容性!打开DataGrid的方法是:在“工具箱”中点右键->“选择项”,在弹出窗口中把命名空间为System.Web.UI.Webcontrols的DataGrid前的勾打上就可以了。注意区别同名的组件。在VS2005环境下,官方推荐使用的是DataGridView。 阅读全文
posted @ 2011-09-27 15:51 左小夕 阅读(580) 评论(0) 推荐(0) 编辑