Hi,
TreeView loading message can be customized by accessing the current expanded element. This element can be accessed through TreeView client Side events which were triggered on Node select and Node expand. Also Custom Text cannot be set in these itself. So We override the TreeView callback event and Custom text is set in this event before callback.
Please refer the below code snippet,
[Javascript]
//Element which shows the loading message
var LoadingElement=null;
//This event used to store the current expanded element on Node click and Node expand actions
function OnExpand(nodeObj)
{
LoadingElement=document.getElementById(nodeObj.HtmlID+"_CT");
}
//Override TreeView callback event to change the 'Loading Message'
window.onload=Override;
function Override()
{
//Here '_sfTreeView1' is the clientSideObject Property of TreeView. This can be changed by using clientSideObject Property
var _sfTreeView1_callback= _sfTreeView1.callback;
_sfTreeView1.callback = function(arg, async, ev )
{
//Set Custom Text
LoadingElement.rows[0].cells[0].innerHTML = "(Custom Text...)";
_sfTreeView1_callback(arg, async, ev );
}
}
Please refer the below sample and let us know if you need further assistance.
http://websamples.syncfusion.com/samples/Tools.Web/5.1.0.51/F69712/main.htmRegards,
Sureshsekaran.