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

I

Ing. Rajesh Kumar

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

Thanks in advance
Raja
 
E

Eric Marvets

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 (e-mail address removed) for Information on Our Architecture and
Mentoring Services

</shameless self promotion>
 
J

Jos

Ing. Rajesh Kumar said:
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top