Reading Time: 1 minute

I have the following control in my Application.

<SharePoint:InputFormTextBox
ID=”txtBxDetails”
RichText=”true”
RichTextMode=”FullHtml”
runat=”server”
TextMode=”MultiLine”
Rows=”10″
Columns=”10″ >
</SharePoint:InputFormTextBox>

1. The control gets rendered alright,Everything works except for the following:

txtBxDetails.ReadOnly = true;
txtBxDetails.Enabled = true;

Interestingly,both these properties don’t work.

2. Also Width property doesn’t work when i add RichText=”true”

Solution 1: For Property Readonly or Enabled

Microsoft has acknowledged this as a bug.Bug ID: 37846
Expect a path for this in the next release..

Solution 2: For expand InputFormTextBox

If you need to expand InputFormTextBox control and CssClass property seems to be not working. <SharePoint:InputFormTextBox
ID=”txtBxDetails”
RichText=”true”
RichTextMode=”FullHtml”
runat=”server”
width=”100%”
TextMode=”MultiLine”
Rows=”10″
Columns=”10″ >
</SharePoint:InputFormTextBox>

Also add Width=”100%” its also not working.

Trying to enlarge the control with style and CssClass attributes were unsuccessful.

I get the view Source(HTML code), I saw that it is rendered as two main element, a table element to display the toolbar and an iframe element.
Table Element used css class as : ms-rtetoolbarmenu
Frame Element used css Class as : ms-rtelong

Then the Solution is you can add this below css code in your webpart or usercontrol.

<style type=”text/css”>
table.ms-rtetoolbarmenu
{
width:100%;
}
iframe.ms-rtelong
{
width:100%;
}
</style>

Then its Expand based on your width.
 

Communities Tagged : Technology
Tagged: InputFormTextBox , Richtextbox

Published by NS, Jenkins on 19 Mar 2009 at 02:14 pm