Have existing resizable TextBox which I want to convert to a RadTextBox:-
<asp:Panel ID="Pan_dataAdditionalContactInformation" runat="server" Width="410" Height="32" ScrollBars="None"><asp:TextBox runat="server" ID="dataAdditionalContactInformation" Text='<%# Bind("AdditionalContactInformation") %>' TextMode="MultiLine" MaxLength="200" Width="420" ToolTip="Example; Any morning between 10 11am except Wednesday or Saturday" /></asp:Panel>
<ajaxToolkit:ResizableControlExtender ID="rce_dataAdditionalContactInformation" runat="server" TargetControlID="Pan_dataAdditionalContactInformation" ResizableCssClass="resizingText" HandleCssClass="handleText" MinimumWidth="420" MinimumHeight="32" MaximumWidth="420" MaximumHeight="250" HandleOffsetX="5" HandleOffsetY="5" OnClientResizing="ResizeTextBox" />
function
ResizeTextBox(sender, eventargs) {
var element = sender.get_element();
element.children[2].style.height = element.style.height;
element.children[2].style.width = element.style.width;
return false;
}
I changed the TextBox to a RadTextBox and use the ResizeRadTextBox function:-
function ResizeRadTextBox(sender, eventargs) {
var element = sender.get_element();
element.children[2].children[0].style.height = element.style.height;
element.children[2].children[0].style.width = element.style.width;
return false;
}
The resizing works, however, as soon as the cursor moves back over the resized RadTextBox it reverts back to its original size.
I have had similar issues where I have been using the wrong method to set the property but can't seem to find a way to set it correctly.
Thanks