婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識(shí)庫 > dataGrid 多維表頭、表頭跨行跨列設(shè)計(jì)及綁定數(shù)據(jù)

dataGrid 多維表頭、表頭跨行跨列設(shè)計(jì)及綁定數(shù)據(jù)

熱門標(biāo)簽:東莞語音電銷機(jī)器人排名 使用智能電話機(jī)器人違法嗎 蘇州銷售外呼系統(tǒng)預(yù)算 太原外呼電銷機(jī)器人費(fèi)用 保山電話外呼管理系統(tǒng)怎么用 淘寶地圖標(biāo)注如何做 電話機(jī)器人廣告話術(shù) 朝陽市地圖標(biāo)注 外呼系統(tǒng)用員工身份證
dataGrid 其實(shí)就是一個(gè)html table 
想清楚這個(gè)以后,要設(shè)置多維表頭就好辦了
html代碼
復(fù)制代碼 代碼如下:

asp:DataGrid ID="DataGrid1" runat="server"
onitemdatabound="DataGrid1_ItemDataBound">
/asp:DataGrid>

然后綁定數(shù)據(jù)
復(fù)制代碼 代碼如下:

protected void Page_Load(object sender, EventArgs e)
{
string strsql = "select EmpID, Name, BranchID, LoginID, Pwd, Sex, EmpCode, Email, OfficeTel from mrBaseInf";
SqlConnection con = new SqlConnection("server=.;database=iOffice2009;uid=sa;pwd=sa");
DataSet ds = new DataSet();
SqlDataAdapter ter = new SqlDataAdapter(strsql, con);
con.Open();
ter.Fill(ds);
con.Close();
this.DataGrid1.DataSource = ds;
DataGrid1.DataBind();
}

接下來添加DataGrid1_ItemDataBoun事件
復(fù)制代碼 代碼如下:

protected void DataGrid1_ItemDataBound(object sender, DataGridItemEventArgs e)
{
if (e.Item.ItemType==ListItemType.Header)
{
e.Item.Cells[0].RowSpan = 2;
e.Item.Cells[1].RowSpan = 2;
e.Item.Cells[2].RowSpan = 2;
e.Item.Cells[3].RowSpan = 2;
e.Item.Cells[4].RowSpan = 2;
e.Item.Cells[5].ColumnSpan = 4;
e.Item.Cells[5].HorizontalAlign = HorizontalAlign.Center;
e.Item.Cells[5].Text = "測試/td>/tr>tr>td>列1/td>td>列2/td>td>列3/td>td>列4/td>/tr>";
e.Item.Cells[6].Visible = false;
e.Item.Cells[7].Visible = false;
e.Item.Cells[8].Visible = false;
}
}

效果圖
您可能感興趣的文章:
  • asp.net DataGrid 中文字符排序的實(shí)現(xiàn)代碼
  • DataGrid 動(dòng)態(tài)添加模板列 實(shí)現(xiàn)代碼
  • asp.net DataGrid控件中彈出詳細(xì)信息窗口
  • 如何在DataGrid控件中實(shí)現(xiàn)自定義分頁
  • ASP.NET中為DataGrid添加合計(jì)字段
  • DataGrid使用心得(調(diào)用及連接數(shù)據(jù)庫等等)

標(biāo)簽:西藏 阿里 呼倫貝爾 洛陽 綏化 克拉瑪依 運(yùn)城 潛江

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《dataGrid 多維表頭、表頭跨行跨列設(shè)計(jì)及綁定數(shù)據(jù)》,本文關(guān)鍵詞  dataGrid,多維,表頭,跨行,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《dataGrid 多維表頭、表頭跨行跨列設(shè)計(jì)及綁定數(shù)據(jù)》相關(guān)的同類信息!
  • 本頁收集關(guān)于dataGrid 多維表頭、表頭跨行跨列設(shè)計(jì)及綁定數(shù)據(jù)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 临沭县| 石台县| 博乐市| 伊川县| 南投县| 土默特左旗| 雷波县| 古浪县| 凌云县| 义马市| 江孜县| 保康县| 九江县| 南昌县| 仙桃市| 新田县| 黔西县| 菏泽市| 屏边| 府谷县| 时尚| 北流市| 华宁县| 中宁县| 阿拉善右旗| 贡嘎县| 淮阳县| 黑山县| 奈曼旗| 县级市| 虹口区| 沁阳市| 南乐县| 开江县| 壤塘县| 元谋县| 青铜峡市| 马边| 伊宁市| 镇江市| 青冈县|