Is it possible to display a large text field with scroll bars in a detailsView

Hey all,

I'm interested in displaying a comments field from my database in a detailsview.  Ideally I'd like to display it in a textbox that is a set number of lines high and if the field is larger than it would add scroll bars.  Is this at all possible?  I'm leaning towards using a formView instead because it seems to be more flexible but potentially a lot more work?  Does the formView allow this?

 I'm very new to ASP.NET

Thanks in advance

7/11/2008 8:36:11 PM 72751 articles. 3 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 48

Just a simple HTML textarea will do the trick!

7/11/2008 9:38:07 PM

I'm unclear on this. When you say an html textarea will do how do I go about adding this to the formview?  So far I've added the formview to my webpage and linked it to a sqldatasource.  It then adds all the fields to the page (from the sqldatasource) and doesn't really give me much flexibility as to how they're displayed other than where they are on the page?  Can I wipe the page of these defaultly displayed items and build it from scratch?  I've been minimizing code and trying to use the automatic approach.  I'd like to use textareas for some and textboxes for others.


7/14/2008 2:57:59 PM

Textboxes have a property called TextMode which can be set to "MultiLine" and you can also specify the number of rows to display in the Rows property.

We're all in this together.
7/14/2008 4:53:58 PM

Similar Artilces:

Changing field names (display name) for a web interface and how to create a scroll bar for a datagrid or any control with a scroll bar to display data
Hello,  Can any1 please help me. i was wondering if any1 can tell  me how i can change  field names for a data grid only for the display on the web interface and also how can i put scroll bars on my data grid. Thank you.       Hi misbahmurtza, You can set field names in HeaderText attribute in any column or template. If you want to create a scroll bar, the easiest way is to set style for the <div> which contains your datagrid. Here is a sample: <div style="vertical-align: top; height:100px; width:100%; overflow:auto;"> Make sure ...

need to make a binded textbox in a detailsview field grow rather then use scroll bars when text is too large.
I have a details view that has a field with a multi line text box that is binded to a database field. Its a forum post actually, and my text box has a set height and if the text is too large it automatically generates scroll bars, but i need it to just grow in height and not use scroll bars.  If I bind to a label it works perfectly but i I lost the carraige returns and other formating if i use a label.  Is there a way to make the multi line text box grow like the label and not use scroll bars?  Thanks for any help. Hi, friend:   Try this:  <textarea ...

Large text fields in gridview not displaying all the text
I have a Boundfield in a gridview that is bound to a 'memo' field.  When displayed the field 'grows' to fit all the text, but it removes all carriage return/line feeds.  How can I get it to 'grow' to the needed size to accommodate all the text AND retain the carriage return/line feeds? If I go into Edit mode, the Boundfield only display about the first 25 characters.   How can I get it to 'grow' to the needed size to accommodate all the text AND retain the carriage return/line feeds?    Replace the BoundField Column w...

Large amounts of text in text control = Page Cannot be Displayed
Hello I am unsure of where this post belongs, but I'll start here. I have text files with sizes often larger than 10mb that I am loading into a text control for viewing. I also have a calendar that allows a user to select the day and load the file for that day. For some reason, when I view a file that has > 8mb or so of data, the next time I postback to that page I get a "Page cannot be displayed." Any ideas? Thanks. Jon I know this article is on WriteFile, but I think you are running into a similar issue. Have you tried writing output to the Response stream in s...

Is there a control which can display scroll bar when image dimension exceed the control
I put a image in the control, when the image dimension is less than the control dimension, it's normal, but when  the image dimension is larger than the control dimension, I hope the control can display a scroll bar , so I can view full dimension image by operate scroll bar.SuperCool Multiple ZIP - A utility to unzip multiple files and work with multiple zip filesSuperCool Random Number Generator Hi, You could simply place your image inside a HTML DIV element with a CSS class that keeps the dimensions, something like the following would work: .scrollableImage...

Possible to turn off explorer scroll bar but allow div scroll bar?
I was just trying to find out if I can disble the vertical scroll bar for the pages but allow vertical scroll bars for a DIV?Best Regards,~Chris In other words disable IE scroll bars but allow DIV scroll bars?I keep running into problems with controls creating useless scroll space in explorer to display nothing.Best Regards,~Chris Unfortunately a DIV does not use % on the height similiar to width of a page.Would be nice for handling varying screen resolutions.Best Regards,~Chris...

Is it possible to Display Rtf text in a Literal Control ?
HI, Actually i wrote a WINDOWS Application, this application stores the Rtf text to the database. And also i have a Web Application which previews the same text. But in the web application the Rtf text is displayed something like this. {\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\fnil\fcharset0 Courier New;}}{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}{\f1\fnil\fcharset0 Courier New;}}\viewkind4\uc1\pard\ltrpar\tx1260\tx3780\tx6840\f0\fs20 Gj\tab ddjsdajadhasjklhjh\tab hjahj...

Display alternate text on label control in DetailsView
Hi,    I have a DetailsView in my edit/data-entry page, problem is there is this Employee field, where in edit mode like to display store employee id and when in add mode I like to display HttpContext.Current.Request.LogonUserIdentity.Name, how could I accomplisehed this? I am using VS 2008 and using wcsf... <asp:TemplateField     HeaderText="Employee :"                 HeaderStyle-CssClass="labelentry"          &...

large text fields not displaying/printing (Ughhh!)
We have a text/string column that can get quite large (I mean really large). We would like to display the column (with a bunch of other columns) in a report and then we would like to print the report. Sounds easy enough, but PB 6.5.1 is not consistently displaying/printing all of the column. I decided to break the nefarious column into 5K chunks. It's not the prettiest way to do it but it was worth a shot. I've tried this in a tabular dw and a rich text dw, with very inconsistent results. Now we're ready to try something drastic. I thought about using MS Word Viewer ...

Display a database bit field (boolean) from Detailsview? Is it possible?
Basically, I've been trying to display a bit value.  Can anybody help?    <script runat="server">  protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e) {                DetailsViewRow selectedRow = DetailsView1.Rows[0];                TableCell MACcomplete = selectedRow.Cells[1];             ...

Cannot display label text when using updatepanel with DetailsView control
Hello, I'm using a DetailsView control for inserting data with a UpdatePanel control I also have a Label control to display error messages if the insertion fails. If for some reason the insertion fails I receive an error and the message will not be displayed. Control with ID 'MessageLabel' being registered through RegisterAsyncPostBackControl or RegisterPostBackControl must implement either INamingContainer, IPostBackDataHandler, or IPostBackEventHandler  <div id="ErrorMessage"> <asp:Label ID="MessageLabel" runat="serv...

No scroll bars on edit control? (plain text version)
I am not sure I am asking the correct question in the right forum but I am using PB 11.5 3127 and have created a web form app... My problem is I have a datawindow that has a text column in SQL Server 2000 that does not show the vertical scroll bar even though I have set the property on the field in the datawindow??? Additionally when I tab into the field during runtime it selects all of the data even though I have not set the Auto Selection... Am I missing something here???? see attachments for the dw properties and display if the runtime... begin 666 pict 1.jpg M_]C_X `02...

Calling a SQL Stored Procedure With Text fields from a DetailsView Control
Hi - my problem is as follows: I'm writing an ASP.Net 2.0 app with C#. From the app, I call a stored procedure that updates some data in the app's database (SQL Server 2000). This stored procedure then declares and assigns a value to a variable of type nvarchar(4000) and calls a 2nd stored procedure, passing it, among other things, the newly created variable. The 2nd stored procedure performs some updates to a different SQL Server 2000 database, one which comes with a 3rd party app we're using. The variable that's passed to the 2nd stored procedure is supposed to be inserted into a text fiel...

How to display dataSet text field in a Label using ADO.NET?
Hello folks. What is the best way to display in a Label one column from a selected row in a GridView? The gridView is populated manually in the code behind, and it displays the data. The column in question is not one of the bound columns in the gridView, but is part of the dataSet (ie, the gridView shows columns 1-3, but I want to display column4 in a label. I started on code to identify the key, but not sure where to go from there. Sorry to bother the forum with this, but after several hours of searching the web and reading I still could not figure it out. many thanks in advance, Chris.Here...

Web resources about - Is it possible to display a large text field with scroll bars in a detailsView -

Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta
In this article, Scott discusses the recently released beta version of Visual Studio 2008 and .NET Framework 3.5 Service Pack 1. He starts with ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013 - Upcoming stories is a community based news site edited by our members. It specialises in .NET development techniques, technologies and tools including ...

<asp:DetailsView ID="grd_empDetails" runat="server" DataSourceID="empDataSource -
Pastebin launched a little side project called , check it out ;-) Don't like ads?

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

Resources last updated: 12/26/2015 11:01:08 PM