This is a migrated thread and some comments may be shown as answers.

RadTextBox Multiline Positioning Issues

4 Answers 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 10 Feb 2011, 07:19 PM
Does anyone know how a multiline RadTextBox can be set to start at the top?  I currently have very large text columns that get binded to a radtextbox multiline with scrolling, however when the page is loaded the textbox is already scrolled all the way to the bottom.  I want it to just load the textbox, but keep the scroll position at the top.  A standard asp:textbox does this by default.

Any ideas?

4 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 16 Feb 2011, 09:53 AM
Hello Shawn,

I tried to replicate the problem but without success. Can you provide some more information on the issue as to how exactly you bind the textbox whether it is in some other control (e.g. RadGrid) and what other settings you have for the textbox. A sample code will be much appreciated.
In fact remaining at the top position should be the default behavior for RadTextBox. You can check it in this demo by replacing the standard ASP.NET textbox with RadTextBox in the edit form.


Kind regards,
Marin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Shawn
Top achievements
Rank 1
answered on 16 Feb 2011, 03:41 PM
The textbox is inside the ItemTemplate of a FormView, and is bound to a column which is part of the SqlDataSource that the Form is using.  It is a very large form, so here is the gist of it:

<asp:Label ID="GridRec" runat="server" Visible="false" Text="" />
<!-- GridRec gets assigned on page_load, this all works fine -->
<asp:SqlDataSource ID="sqlds_dlrs" runat="server"
        ConnectionString="<%$ ConnectionStrings:Master_ConnectionString %>" SelectCommand="SELECT
id,
name,
admin_notes,
...(etc)
FROM table
WHERE id = @dID">
<SelectParameters>
<asp:ControlParameter Name="dID" Type="String" ControlID="GridRec" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
 <asp:FormView ID="form_dlrs" runat="server"
        DataKeyNames="id" DataSourceID="sqlds_dlrs">
                <EditItemTemplate>
.... edit items
</EditItemTemplate>
<InsertItemTemplate>
... insert items
</InsertItemTemplate>
<ItemTemplate>
... other controls
<telerik:RadTextBox ID="txt_admin_notes" runat="server" Columns="70" Rows="10" ReadOnly="true" TextMode="MultiLine" Text='<%# Bind("admin_notes") %>'>
            </telerik:RadTextBox>
</ItemTemplate>
</asp:FormView>

Some things to note:

The column going into the textbox is of SQL type 'TEXT' and contains many snippets of formatted text with linebreaks like this:

Recorded 2/15/2011 1:09:51 PM
By: Administrator 1
changing dlr fax information
- - - - - - - -
Recorded 2/15/2011 12:37:30 PM
By: Administrator 3
suspended account due to inactivity and incorrect contact information
- - - - - - - -
Recorded 2/10/2011 3:08:02 PM
By: Administrator 1
updating information after call-in
- - - - - - - -
Recorded 2/10/2011 3:04:09 PM
By: Administrator 11
ran statistics report for month of Dec and Jan
- - - - - - - -

... many, many more
0
Marin
Telerik team
answered on 17 Feb 2011, 12:45 PM
Hi Shawn,

Thank you for the code sample.

I tested tested it on my end but I am still not able to reproduce the issue.
I am sending a sample project based on the code and the data pattern that you sent. Please have a look at it and see how it works on your end and what other modifications need to be done in order to reproduce the issue.

Kind regards,
Marin
the Telerik team
0
Shawn
Top achievements
Rank 1
answered on 19 Feb 2011, 02:16 PM
It turns out that the issue is with Firefox Beta 4, not the control(s) at all.  It works fine in all other environments.  Sorry to waste your time.
Tags
General Discussions
Asked by
Shawn
Top achievements
Rank 1
Answers by
Marin
Telerik team
Shawn
Top achievements
Rank 1
Share this question
or