用css控制datagrid的樣式

來源:互聯網
上載者:User
用css控制datagrid的樣式       儘管系統提供了幾種可以直接套用的樣式,但是多數情況還是需要自己寫css樣式,我的問題是實現下面的這種樣式,怎麼寫css,不用我還在datagrid裡面添加“bordercolor=black”?

我弄了好久沒有弄出來,最終也沒有完全把樣式添加到css檔案裡面,我的實現辦法是

1,在datagrid裡面添加 “bordercolor=black”
2,

<ItemStyle CssClass="dg_item"></ItemStyle><HeaderStyle CssClass="dg_header"></HeaderStyle>

3,css樣式為: 1.dg_item
 2{}{
 3 color:#330099;
 4 background-color:expression((this.sectionRowIndex%2==0)? '#E5ECF4' : '#F2F2F2' ) ;
 5 border-width:1px;
 6 border-color:#000000;
 7 border-style:solid;
 8}
 9.dg_header
10{}{
11 font-weight :bold ;
12 color:#000000;
13 background-color :#E5ECF4;
14 border-width: 1px;
15 border-color :#000000;
16 border-style :solid;
17
18}

 
 
 
 
 
 
 
 
 
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.