GridView中页脚的背景颜色 [英] background color for footer in gridview

查看:113
本文介绍了GridView中页脚的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在网格视图中更改单个单元格页脚的背景颜色.我不需要整行的背景色.

How to change background color for footer of a single cell in grid view. I don''t need background color for entire row.

推荐答案

您可以通过为页脚创建CSS来实现此目的,如这篇非常有用的文章教程15:在GridView的页脚中显示摘要信息 [
You can do this by creating a CSS for the footer as described in this very useful article Tutorial 15: Displaying Summary Information in the GridView''s Footer[^].


您可以喜欢这个:

这里cells [0]表示第零个单元格,您可以给您的单元格索引
you can do like this:

here cells[0] indicates zeroth cell ,you can give your cell index
gridview1.FooterRow.Cells[0].BackColor = System.Drawing.Color.Red;


请参见参考资料,

//颜色
http://www.sharepointjohn.com/asp -net-c-change-gridview-cell-background-color-based-on-value/ [ ^ ]

//为图像插入ex
http://tiredblogger.wordpress.com/2007/09/26 /dynamically-setting-a-gridview-cell-background/ [
see reference,

//color
http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/[^]

//insert ex for images
http://tiredblogger.wordpress.com/2007/09/26/dynamically-setting-a-gridview-cell-background/[^]


这篇关于GridView中页脚的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆