![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
GridView
文章平均质量分 72
zhjihui_080220
这个作者很懒,什么都没留下…
展开
-
GridView的编辑、新增、删除
在GridView1中添加一项CommandField,放到第一列,然后将ShowDeleteButton、ShowInsertButton、ShowEditButton都设为True,再将此字段转换为TemplateField,此时在此编辑模板列的ItemTemplate中有编辑、新建、删除按钮,EditItemTemplate中有更新、取消按钮。 设置一个Label,IsInert为标识操作原创 2007-06-06 08:20:00 · 1307 阅读 · 0 评论 -
合并GridView中的单元格
有时我们需要将GridView中的前几列显示相同的数据合并起来,让表格看起来有分组的感觉。 int i, j, k, intSpan;//i开始行,j比较行,k列数,intSpan相同行数 string strTemp;//保存开始行的值 if (PressCrackData.Rows.Count > 0) ...{ for原创 2007-06-06 08:59:00 · 1425 阅读 · 0 评论 -
GridView中的DropDownList操作
要想在GridView1中使用DropDownList,将字段列变为模板列,在EditItemTemplate中加入DropDownList,点击编辑时DropDownList中显示库里所显示的内容,就应该在GridView1_RowDataBound中进行操作。protected void GridView1_RowDataBound(object sender, GridViewRo原创 2007-06-06 08:54:00 · 859 阅读 · 0 评论