日期:2014-05-17 浏览次数:20412 次
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
DataGridDataBind();
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
}
}
public void BindData()
{
DataTable dt = new DataTable();
dt.Columns.Add("编号");
dt.Columns.Add("订单号");
dt.Columns.Add("时间");
for (int i = 1; i < 11; i++)
{
DataRow dr = dt.NewRow();
dr["编号"] = i;
dr["订单号"] = 10000+i;
dr["时间"] = DateTime.Now;
dt.