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

Discussion in 'ASP .Net' started by Ing. Rajesh Kumar, May 22, 2004.

  1. Hi everybody
    Is it possible to set the size of text boxes when in edit mode ?

    Thanks in advance
    Raja
     
    Ing. Rajesh Kumar, May 22, 2004
    #1
    1. Advertising

  2. Ing. Rajesh Kumar

    Eric Marvets Guest

    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 for Information on Our Architecture and
    Mentoring Services

    </shameless self promotion>
     
    Eric Marvets, May 22, 2004
    #2
    1. Advertising

  3. Ing. Rajesh Kumar

    Jos Guest

    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
     
    Jos, May 22, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?R2FyeQ==?=
    Replies:
    2
    Views:
    469
    Wasi Rehman
    Oct 29, 2004
  2. Paul D. Sullivan
    Replies:
    0
    Views:
    2,559
    Paul D. Sullivan
    Jul 20, 2005
  3. Frank Kurka
    Replies:
    8
    Views:
    321
  4. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    418
    Jaime Stuardo
    Apr 7, 2006
  5. jobs at webdos
    Replies:
    0
    Views:
    490
    jobs at webdos
    Oct 9, 2006
Loading...

Share This Page