This seems very, very strange to me, but the solution I have found (it works so far anyway), is to simply add the handler for NodesNeeded. It doesn't have to do anything, or have any code in it, but as long as it is declared, the indenting seems to be correct. Just in case anyone else runs into this...
answered on 06 May 2011, 12:33 PM
Hello Sonya L,
You are right. To work in a load-on-demand scenario, you must handle the NodesNeeded event and this will enable the load-on-demand behavior in RadTreeView control. The reason we made the load-on-demand functinality work this way was because we wanted to provide simple API where just the process of handling one event (NodesNeeded) allows you to benefit from the load-on-demand feature.
For scenarios where Load-On-Demand is implemented outside the NodesNeeded event, this API may not be relevant. Because of this arising confusion we will consider implementing a new boolean property which enables/disables the external Load-on-Demand implementation. Most probably, the new property will be included in the next version of RadTreeView control. Currently, you can use an empty NodesNeeded event handler as you have found.
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.