Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Is it possible to set the size of text boxes in edit mode ?

Reply
Thread Tools

Is it possible to set the size of text boxes in edit mode ?

 
 
Ing. Rajesh Kumar
Guest
Posts: n/a
 
      05-22-2004
Hi everybody
Is it possible to set the size of text boxes when in edit mode ?

Thanks in advance
Raja

 
Reply With Quote
 
 
 
 
Eric Marvets
Guest
Posts: n/a
 
      05-22-2004
Well, if you mean width the Textbox has a width property where you can set
the pixel width. If you mean length, there is a MaxLength property.

Is that what you were asking?

--
Eric Marvets
Principal Consultant

the bang project

<shameless self promotion>

Email http://www.velocityreviews.com/forums/(E-Mail Removed) for Information on Our Architecture and
Mentoring Services

</shameless self promotion>


 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      05-22-2004
Ing. Rajesh Kumar wrote:
> Hi everybody
> Is it possible to set the size of text boxes when in edit mode ?
>
> Thanks in advance
> Raja


I guess you mean the edit boxes in a datagrid?

If you want to change their sizes, you'll have to turn AutoGenerateColumns
off,
and add all the editable columns as TemplateColumns.

Something like this:

<asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False" >
<Columns>
<asp:TemplateColumn HeaderText="Name">
<ItemTemplate>
<asp:Label runat="server"
text='<%# DataBinder.Eval(Container,
"DataItem.DataItem.Name") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id="soort" runat="server" Width="320px"
Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>

--

Jos


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FFox jumping into new tab mode; mouse wheel jumpinginto text size mode kaplan3jiim@comcast.net Firefox 1 07-19-2006 04:23 PM
Invision Power Board 1.3 - Changing font size in Post, Reply & Edit boxes Paul D. Sullivan HTML 0 07-20-2005 05:20 PM
Snapshot restraint - edit, edit, edit Alan Browne Digital Photography 24 05-10-2005 10:15 PM
Snapshot restraint - edit, edit, edit Patrick Digital Photography 0 05-06-2005 10:53 PM
Disabling text boxes within a data grid whilst in edit mode. =?Utf-8?B?R2FyeQ==?= ASP .Net 2 10-29-2004 06:25 AM



Advertisments