Databound Textbox vs. Width property

A

Arthur Dent

Please help...

I have a datagrid with a template column containing a databound textbox. The
textbox width is set to 100%, so it automatically fills the column.
When you type into a textbox, if you type in more than the width, it just
kind of scrolls out the end of the textbox. I am having troubles though with
longer values getting bound to the textbox. when the textbox is bound, if
the text is too long to fit in the box, instead of just cutting it off, and
text-scrolling out past the end of the textbox, it makes the textbox wide
enough to accomodate the whole text. This is wreaking havoc with my page
layout.
I tried setting the width programmatically in the code-behind file
OnItemDataBound,
I also tried setting it to a set pixel width, instead of a percent. Neither
helped.

Any ideas on how to correct this?

Thanks in advance,
- Arthur Dent.
 
G

Gold

Restrict the width of your template column to whatever you want, instead of
specifying the size for your text box.
Hope this will work,

:)
/Thangam
 

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,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top