I am using a radtreeview using code behind to generate the nodes. When the user puts the treeview into 'edit' mode I add a text box to the node using the code below.
The problem occurs when a user clicks on a text box. The text box and node seem to get focus. The user cannot use the mouse to select any text in the text box. This is a major pain if the text box has a lot of text and they need to select a large chunk of text and delete it.
The text box is also ignoring the SelectionOnFocus, no text is not being selected on focus.
Can I get some help for these two problems? Both probably stem from the same behavior. Maybe Z-order could fix this?
The problem occurs when a user clicks on a text box. The text box and node seem to get focus. The user cannot use the mouse to select any text in the text box. This is a major pain if the text box has a lot of text and they need to select a large chunk of text and delete it.
The text box is also ignoring the SelectionOnFocus, no text is not being selected on focus.
Can I get some help for these two problems? Both probably stem from the same behavior. Maybe Z-order could fix this?
internal
class NodeCheckboxTemplate : NodeBaseTemplate, ITemplate
{
public NodeCheckboxTemplate(NodeBuilderContext context, bool editing) : base(context, editing) { }
public void InstantiateIn(Control container)
{
var node = (RadTreeNode)container;
if (IsEditing)
{
var factTextBoxControl = new RadTextBox
{
ID = container.UniqueID +
"RadTextBox",
SkinID =
"treeTextBox",
Width =
Unit.Pixel(FactGridTemplateBuilder.Width),
Text = node.Value,
SelectionOnFocus =
SelectionOnFocus.SelectAll,
EnableViewState =
false
};
factTextBoxControl.Text = node.Value;
node.Controls.Add(factTextBoxControl);
}
else
{
CreateValueLabel(container, node.Value);
}
}
}