摘要: ·使用LoadTemplate()方法 ·创建自定义模板列使用LoadTemplate()方法增加TemplateField为了本例的实现,你需要在Visutal Studio新建一个websit。拖拽一个GridView和SqlDataSource到默认页。我们将通过编码设置这些控件的一些列属性。首先,我们将使用LoadTemplate()方法来增加一个TemplateField。... 阅读全文
posted @ 2009-04-13 16:45 三颗屎 阅读(507) 评论(0) 推荐(0) 编辑
摘要: 新建一个web站点实例在Visual Studio里新建一个web站点。拖拽一个GridViw控件和一个SqlDataSource控件到默认的webform上。不要在设计阶段设置控件的任何属性,我们将通过编码实现它的功能。下面给出在Page_Load事件中的代码 protected void Page_Load(object sender, EventArgs e){ SqlDataSour... 阅读全文
posted @ 2009-04-13 16:43 三颗屎 阅读(454) 评论(0) 推荐(0) 编辑