Methods
On the client-side we added a number of parameters for each event we want to handle.
We also specified in the post function the name of the server-side method which will implement
the server-side processing for each event.
The arguments of these methods will be the parameters created with the AddParam function.
For adding nodes:
public string OnAddNode(string parentId, string childId, string textOrHTML, string expanded, string image, string subTreeURL)
{
oTreeDB.EventType = "Add";
oTreeDB.EventData = parentId + "|" + childId + "|" + textOrHTML + "|" + image + "|" + expanded;
string sResult = oTreeDB.Process();
return sResult;
}
For editing nodes:
public string OnNodeEdit(string id, string text, string prevText)
{
oTreeDB.EventType = "Edit";
oTreeDB.EventData = id + "|" + text;
string sResult = oTreeDB.Process();
return sResult;
}
For removing nodes:
public string OnRemoveNode(string id)
{
oTreeDB.EventType = "Remove";
oTreeDB.EventData = id;
string sResult = oTreeDB.Process();
return sResult;
}
For updating the level of the nodes:
public string OnNodeDrop(string src, string dst)
{
oTreeDB.EventType = "UpdateLevel";
oTreeDB.EventData = dst + "," + src;
string sResult = oTreeDB.Process();
return sResult;
}
Read more about implementing the server-side methods for the AJAXPage control.
Please, ask any questions support@obout.com. See How-To page
|