Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Agent and App Development Solutions
Build. Accelerate. Govern.
AI-Ready Application Experiences
AI-Assisted SDLC
Agent Governance and Control
Telerik
Build modern .NET business apps
.Net Web
Desktop
Reporting and Documents
Cross-Platform
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
CMS
Debugging
UI Tools
Free Tools
Support and Learning
Productivity and Design Tools
How do I change a node's checkbox state when the user clicks on the node's label text as opposed to clicking on the checkbox itself?
This needs to work when the treeview is in Tri-state mode (needs to handle intedeterminate state as well as on/off).
Thanks
public
RadForm1()
{
InitializeComponent();
radTreeView1.Click += RadTreeView1_Click;
radTreeView1.NodeFormatting += RadTreeView1_NodeFormatting;
}
private
void
RadTreeView1_NodeFormatting(
object
sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
e.NodeElement.ContentElement.ShouldHandleMouseInput =
true
;
RadTreeView1_Click(
sender, EventArgs e)
var element = radTreeView1.ElementTree.GetElementAtPoint(((MouseEventArgs)e).Location);
if
(element
is
TreeNodeContentElement)
var node = element.Parent
as
TreeNodeElement;
node.Data.Checked = !node.Data.Checked;
Thanks Dimitar, that worked.
-Lou