閲覧総計:14542  (本日:1  昨日:0)

 ListViewやGridViewの編集・挿入のTextBoxのデフォルトは160pxサイズである。
 項目によって大き過ぎたり、小さ過ぎたりしている。
 この編集時のTextBoxのサイズを変更したい場合は、所望のTextBox IDの行に
Width="80px"等、希望のサイズを記述すればTextBoxのサイズが変更できる。
09/09/13

開発環境:VWD2008
サーバ:Windows Server2003 + .NET Framework3.5

【TextBoxのサイズ変更前後の画面】

ListViewTextBoxSize.JPG

希望のTextBoxサイズ(例:Width="80px")の記述例
 <InsertItemTemplate>
   <tr style="">
     <td>
       <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="挿入" />
       <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="クリア" />
     </td>
     <td>
        </td>
     <td>
       <asp:TextBox ID="名前TextBox" runat="server" Width="80px" Text='<%# Bind("名前") %>' />
     </td>
     <td>
       <asp:TextBox ID="年齢TextBox" runat="server" Width="30px" Text='<%# Bind("年齢") %>' />
     </td>
   </tr>
 </InsertItemTemplate>

【参考にしたページ】
   該当ページなし


選択肢 投票
参考になった 3  
ふつう 1  
参考にならなかった 0  

添付ファイル: fileListViewTextBoxSize.JPG 658件 [詳細]

トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-05-12 (金) 19:10:21 (347d)