閲覧総計:14597 (本日:2 昨日:2)
ListViewやGridViewの編集・挿入のTextBoxのデフォルトは160pxサイズである。
項目によって大き過ぎたり、小さ過ぎたりしている。
この編集時のTextBoxのサイズを変更したい場合は、所望のTextBox IDの行に
Width="80px"等、希望のサイズを記述すればTextBoxのサイズが変更できる。
09/09/13
開発環境:VWD2008
サーバ:Windows Server2003 + .NET Framework3.5
【TextBoxのサイズ変更前後の画面】
希望の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>
【参考にしたページ】
該当ページなし