国产探花免费观看_亚洲丰满少妇自慰呻吟_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了。 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 旬邑县| 广水市| 上杭县| 共和县| 弋阳县| 澎湖县| 南投市| 绍兴市| 炎陵县| 纳雍县| 安义县| 涞源县| 调兵山市| 泉州市| 承德县| 普兰店市| 新晃| 巴青县| 芦山县| 辽源市| 乃东县| 绥滨县| 和平县| 揭西县| 南康市| 即墨市| 澄迈县| 嘉兴市| 梓潼县| 松潘县| 宁强县| 舟曲县| 云安县| 南昌县| 隆林| 卢氏县| 沂源县| 社旗县| 高密市| 息烽县| 孟津县|