Then code this Event. In my case I was taking the item and putting it in a text box then "Clearing Out" the selected item.
private void OnListElementClick(object sender, EventArgs e)
{
ComponentThemableElementTree elementTree = this.racContentTypeOfDoc.ListElement.ElementTree;
Point mousePosition = elementTree.Control.PointToClient(Control.MousePosition);
RadElement element = elementTree.GetElementAtPoint(mousePosition);
while (element != null)
{
RadListVisualItem item = element as RadListVisualItem;
if (item != null)
{
if (txtSearch.Text.Trim().Length > 0)
if (rbOr.Checked)
txtSearch.Text += " OR (";
else
txtSearch.Text += " AND (";
else
txtSearch.Text = "(";
txtSearch.Text += item.Text;
txtSearch.Text += ")";
break;
}
element = element.Parent;
}
racContentTypeOfDoc.Clear();
}
0
Nadya | Tech Support Engineer
Telerik team
answered on 12 Mar 2021, 03:15 PM
Hello, Roger,
According to the information in your second post, it seems that you managed to found a working solution for your case. I am really glad that handling the ListElement.ElementTree.Control.Click event helps you do the job.
In case you have any other questions do not hesitate to contact us.