国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

css設定表格寬度

2024-07-21 02:16:38
字體:
來源:轉載
供稿:網友
靠!
你真的不會css?那你先找一下css的資料吧。
比如你的css文件里面有以下內容:
class1{width:20%;}
class2{width:30%;}

然后寫你的datagrid,你不要使用它默認的寫法,將autogenrated(這個單詞我忘了怎么拼了)設置為false,然后自己綁定到datagrid里面的模板里面,在每一項里面設置,老天,我剛才又看了一下你的貼子,這才明白,你只是使用的datagrid的原始功能呀?
看看下面的寫法:
<asp:datagrid id="programmaticid" runat=server
   datasource='<%# databindingexpression %>'
   autogeneratecolumns="false"
   (other properties)>

   <columns>
      <asp:boundcolumn
         datafield="datasourcefield"
         dataformatstring="formatstring"
         footertext="footertext"
         headerimageurl="url"
         headertext="headertext"
         readonly="true|false"
         sortfield="datasourcefieldtosortby"
         visible="true|false"
         footerstyle-property="value"
         headerstyle-property="value"
         itemstyle-property="value"
      />

      <asp:buttoncolumn
         buttontype="linkbutton|pushbutton"
         command="bubbletext"
         datatextfield="datasourcefield"
         datatextformatstring="formatstring"
         footertext="footertext"
         headerimageurl="url"
         headertext="headertext"
         readonly="true|false"
         sortfield="datasourcefieldtosortby"
         text="buttoncaption"
         visible="true|false"
      />

      <asp:editcommandcolumn
         buttontype="linkbutton|pushbutton"
         canceltext="cancelbuttoncaption"
         edittext="editbuttoncaption"
         footertext="footertext"
         headerimageurl="url"
         headertext="headertext"
         readonly="true|false"
         sortfield="datasourcefieldtosortby"
         updatetext="updatebuttoncaption"
         visible="true|false"
        />

      <asp:hyperlinkcolumn
         datanavigateurlfield="datasourcefield"
         datanavigateurlformatstring="formatexpression"
         datatextfield="datasourcefield"
         datatextformatstring="formatexpression"
         footertext="footertext"
         headerimageurl="url"
         headertext="headertext"
         navigateurl="url"
         readonly="true|false"
         sortfield="datasourcefieldtosortby"
         target="window"
         text="hyperlinktext"
         visible="true|false"
       />

      <asp:templatecolumn>
         footertext="footertext"
         headerimageurl="url"
         headertext="headertext"
         readonly="true|false"
         sortfield="datasourcefieldtosortby"
         visible="true|false"
         <headertemplate>
             header template html
         </headertemplate >
         <itemtemplate>
             itemtemplate html
         </itemtemplate>
         <edititemtemplate>
             edititem template html
         </edititemtemplate>
         <footertemplate>
             footer template html
         </footertemplate>
      </asp:templatecolumn>
    </columns>
</asp:datagrid>
然后你可以為每一個模板指定一個cssclass了,或者直接在里面設置,就不必再使用css了。 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 汤原县| 安多县| 改则县| 丽江市| 基隆市| 牙克石市| 兴宁市| 内黄县| 奉新县| 卢龙县| 深圳市| 元江| 西充县| 武义县| 广丰县| 汕头市| 云梦县| 泸溪县| 布尔津县| 密山市| 东山县| 漯河市| 丹东市| 鲜城| 红安县| 冀州市| 邓州市| 晋州市| 潮安县| 贡嘎县| 克拉玛依市| 兴化市| 迁西县| 英吉沙县| 阿勒泰市| 华亭县| 兴文县| 马山县| 东阿县| 同仁县| 大田县|