62,052
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
Data_Bind();
}
}
private void Data_Bind()
{
string sql_str = "SELECT * FROM YH_GS";
DataSet ds = WebFunction.dataSet(sql_str);
Gv_gsinfo.DataSource = ds;
Gv_gsinfo.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
Gv_gsinfo.Columns.RemoveAt(3);
Data_Bind();
Response.Write(Gv_gsinfo.Rows.Count+"<br/>");
Response.Write(Gv_gsinfo.HeaderRow.Cells.Count+"<br/>");
Response.Write(Gv_gsinfo.Rows[0].Cells.Count);
}