Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create tri-state checkboxes with a TreeView control in .NET?

I have a treeview control in a Windows Forms project that has checkboxes turned on. Because the treeview control has nested nodes, I need the checkboxes to be able to have some sort of tri-mode selection. I can't find a way to do this (I can only have the checkboxes fully checked or unchecked).

like image 629
Matt Hanson Avatar asked Sep 09 '08 21:09

Matt Hanson


1 Answers

If you are talking about Windows Forms, this article should help you build you tri-state TreeView:

http://www.codeproject.com/KB/tree/treeviewex2003.aspx?display=Print

If you need tri-state checkboxes on a treeview on asp.net i think you need to use a third-party component. Take a look a this one, and click "tri-state checkboxes" on the left side:

http://www.aspnetexpert.com/demos/tree/default.aspx

like image 164
Espo Avatar answered Oct 18 '22 20:10

Espo