asp gridView 无数据时候,显示表头
public void Gridview_BindNoRecords(GridView gridView, DataTable dt) // gridView,绑定数据源DT
{
int a = dt.Rows.Count;
if (dt.Rows.Count == 0)
{
dt.Rows.Add(dt.NewRow());
gridView.DataSource = dt;
gridView.DataBind();
int columnCount = gridView.Rows[0].Cells.Count;
gridView.Rows[0].Cells.Clear();
gridView.Rows[0].Cells.Add(new TableCell());
gridView.Rows[0].Cells[0].ColumnSpan = columnCount;
gridView.Rows[0].Cells[0].Text = "要显示的内容";
gridView.RowStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
}
}
调用:
在 gridView.BindData();方法后 调用!
相关文档:
1.avi格式
<object id="video" width="400" height="200" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
<param name="ShowDisplay" value="0">
<param name="ShowControls" value="1">
<param name="AutoStart" value="1">
<param name="AutoRewind" value="0"> ......
计算闰年主要是为了判断2月份的天数,一般闰年2月份是29天,平年2月份是28天。计算闰年的算法非常简单,即:能被400整除,或者能被4整除而不能被100整除。
算法如下:
function isLeapYear(pYear)
set oreg=new RegExp
oreg.Pattern="^\d{4}$"
if n ......
我想用C#实现象ASP中的
rs.addnew
rs( "a ") = "aaa "
rs( "b ") = 123
rs.update
这样方法添加数据,问一下,要怎么做啊?
具体方法如下
string dbPath = "../App_data/We ......
JS:
//获取元素指定tagName的父元素 lxh 2009 03 10
function public_GetParentByTagName(element, tagName)
{
var parent = element.parentNode;
var upperTagName = tagName.toUpperCase();
while (parent && (parent.tagName.toU ......